diff --git a/docs/api/classes/Actions.md b/docs/api/classes/Actions.md index b9ced584..6ce13b0f 100644 --- a/docs/api/classes/Actions.md +++ b/docs/api/classes/Actions.md @@ -2,7 +2,7 @@ # Class: Actions -Defined in: [src/core/Actions.ts:46](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L46) +Defined in: [src/core/Actions.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L46) ## Constructors @@ -10,7 +10,7 @@ Defined in: [src/core/Actions.ts:46](https://github.com/LuanRT/YouTube.js/blob/4 > **new Actions**(`session`): `Actions` -Defined in: [src/core/Actions.ts:49](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L49) +Defined in: [src/core/Actions.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L49) #### Parameters @@ -28,7 +28,7 @@ Defined in: [src/core/Actions.ts:49](https://github.com/LuanRT/YouTube.js/blob/4 > **session**: [`Session`](Session.md) -Defined in: [src/core/Actions.ts:47](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L47) +Defined in: [src/core/Actions.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L47) ## Methods @@ -38,7 +38,7 @@ Defined in: [src/core/Actions.ts:47](https://github.com/LuanRT/YouTube.js/blob/4 > **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) +Defined in: [src/core/Actions.ts:81](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L81) Executes an API call. @@ -84,7 +84,7 @@ Call arguments > **execute**\<`T`\>(`endpoint`, `args?`): `Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\> -Defined in: [src/core/Actions.ts:88](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L88) +Defined in: [src/core/Actions.ts:88](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L88) Executes an API call. @@ -132,7 +132,7 @@ Call arguments > **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) +Defined in: [src/core/Actions.ts:59](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L59) Makes calls to the playback tracking API. diff --git a/docs/api/classes/AppendContinuationItemsAction.md b/docs/api/classes/AppendContinuationItemsAction.md new file mode 100644 index 00000000..0cfa97a7 --- /dev/null +++ b/docs/api/classes/AppendContinuationItemsAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../README.md) / AppendContinuationItemsAction + +# Class: AppendContinuationItemsAction + +Defined in: [src/parser/classes/actions/AppendContinuationItemsAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/AppendContinuationItemsAction.ts#L6) + +## Extends + +- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AppendContinuationItemsAction**(`data`): `AppendContinuationItemsAction` + +Defined in: [src/parser/classes/actions/AppendContinuationItemsAction.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/AppendContinuationItemsAction.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../type-aliases/RawNode.md) + +#### Returns + +`AppendContinuationItemsAction` + +#### Overrides + +[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/actions/AppendContinuationItemsAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/AppendContinuationItemsAction.ts#L9) + +*** + +### target + +> **target**: `string` + +Defined in: [src/parser/classes/actions/AppendContinuationItemsAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/AppendContinuationItemsAction.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AppendContinuationItemsAction'` + +Defined in: [src/parser/classes/actions/AppendContinuationItemsAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/AppendContinuationItemsAction.ts#L7) + +#### Overrides + +[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### 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` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AppendContinuationItemsAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AppendContinuationItemsAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### 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` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **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/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key) diff --git a/docs/api/classes/Continuation.md b/docs/api/classes/Continuation.md index f5ea3f77..f0724f15 100644 --- a/docs/api/classes/Continuation.md +++ b/docs/api/classes/Continuation.md @@ -2,7 +2,7 @@ # Class: Continuation -Defined in: [src/parser/continuations.ts:139](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L139) +Defined in: [src/parser/continuations.ts:139](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L139) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:139](https://github.com/LuanRT/YouTube. > **new Continuation**(`data`): `Continuation` -Defined in: [src/parser/continuations.ts:147](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L147) +Defined in: [src/parser/continuations.ts:147](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L147) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:147](https://github.com/LuanRT/YouTube. > **continuation\_type**: `string` -Defined in: [src/parser/continuations.ts:142](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L142) +Defined in: [src/parser/continuations.ts:142](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L142) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:142](https://github.com/LuanRT/YouTube. > `optional` **time\_until\_last\_message\_ms**: `number` -Defined in: [src/parser/continuations.ts:144](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L144) +Defined in: [src/parser/continuations.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L144) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:144](https://github.com/LuanRT/YouTube. > `optional` **timeout\_ms**: `number` -Defined in: [src/parser/continuations.ts:143](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L143) +Defined in: [src/parser/continuations.ts:143](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L143) *** @@ -60,7 +60,7 @@ Defined in: [src/parser/continuations.ts:143](https://github.com/LuanRT/YouTube. > **token**: `string` -Defined in: [src/parser/continuations.ts:145](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L145) +Defined in: [src/parser/continuations.ts:145](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L145) *** @@ -68,7 +68,7 @@ Defined in: [src/parser/continuations.ts:145](https://github.com/LuanRT/YouTube. > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -80,7 +80,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:140](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L140) #### Overrides @@ -92,7 +92,7 @@ Defined in: [src/parser/continuations.ts:140](https://github.com/LuanRT/YouTube. > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -134,7 +134,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -172,7 +172,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -210,7 +210,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/ContinuationCommand.md b/docs/api/classes/ContinuationCommand.md index 45b4b5ff..d298bb09 100644 --- a/docs/api/classes/ContinuationCommand.md +++ b/docs/api/classes/ContinuationCommand.md @@ -2,7 +2,7 @@ # Class: ContinuationCommand -Defined in: [src/parser/continuations.ts:214](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L214) +Defined in: [src/parser/continuations.ts:214](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L214) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:214](https://github.com/LuanRT/YouTube. > **new ContinuationCommand**(`data`): `ContinuationCommand` -Defined in: [src/parser/continuations.ts:220](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L220) +Defined in: [src/parser/continuations.ts:220](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L220) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:220](https://github.com/LuanRT/YouTube. > **request**: `string` -Defined in: [src/parser/continuations.ts:217](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L217) +Defined in: [src/parser/continuations.ts:217](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L217) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:217](https://github.com/LuanRT/YouTube. > **token**: `string` -Defined in: [src/parser/continuations.ts:218](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L218) +Defined in: [src/parser/continuations.ts:218](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L218) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:218](https://github.com/LuanRT/YouTube. > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -64,7 +64,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:215](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L215) #### Overrides @@ -76,7 +76,7 @@ Defined in: [src/parser/continuations.ts:215](https://github.com/LuanRT/YouTube. > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -118,7 +118,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -156,7 +156,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -194,7 +194,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/EventEmitter.md b/docs/api/classes/EventEmitter.md index 8adf282b..2b0d5623 100644 --- a/docs/api/classes/EventEmitter.md +++ b/docs/api/classes/EventEmitter.md @@ -2,7 +2,7 @@ # Class: EventEmitter -Defined in: [src/utils/EventEmitterLike.ts:3](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L3) +Defined in: [src/utils/EventEmitterLike.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L3) ## Extends @@ -19,7 +19,7 @@ Defined in: [src/utils/EventEmitterLike.ts:3](https://github.com/LuanRT/YouTube. > **new EventEmitter**(): `EventEmitterLike` -Defined in: [src/utils/EventEmitterLike.ts:6](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L6) +Defined in: [src/utils/EventEmitterLike.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L6) #### Returns @@ -107,7 +107,7 @@ Dispatches a synthetic event event to target and returns true if either event's > **emit**(`type`, ...`args`): `void` -Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L10) +Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L10) #### Parameters @@ -129,7 +129,7 @@ Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube > **off**(`type`, `listener`): `void` -Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L40) +Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L40) #### Parameters @@ -151,7 +151,7 @@ Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube > **on**(`type`, `listener`): `void` -Defined in: [src/utils/EventEmitterLike.ts:15](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L15) +Defined in: [src/utils/EventEmitterLike.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L15) #### Parameters @@ -173,7 +173,7 @@ Defined in: [src/utils/EventEmitterLike.ts:15](https://github.com/LuanRT/YouTube > **once**(`type`, `listener`): `void` -Defined in: [src/utils/EventEmitterLike.ts:27](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L27) +Defined in: [src/utils/EventEmitterLike.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L27) #### Parameters diff --git a/docs/api/classes/GridContinuation.md b/docs/api/classes/GridContinuation.md index 1f0a2d58..6af64fee 100644 --- a/docs/api/classes/GridContinuation.md +++ b/docs/api/classes/GridContinuation.md @@ -2,7 +2,7 @@ # Class: GridContinuation -Defined in: [src/parser/continuations.ts:108](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L108) +Defined in: [src/parser/continuations.ts:108](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L108) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:108](https://github.com/LuanRT/YouTube. > **new GridContinuation**(`data`): `GridContinuation` -Defined in: [src/parser/continuations.ts:114](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L114) +Defined in: [src/parser/continuations.ts:114](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L114) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:114](https://github.com/LuanRT/YouTube. > **continuation**: `string` -Defined in: [src/parser/continuations.ts:111](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L111) +Defined in: [src/parser/continuations.ts:111](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L111) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:111](https://github.com/LuanRT/YouTube. > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L112) +Defined in: [src/parser/continuations.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L112) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:112](https://github.com/LuanRT/YouTube. > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -64,7 +64,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:109](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L109) #### Overrides @@ -78,7 +78,7 @@ Defined in: [src/parser/continuations.ts:109](https://github.com/LuanRT/YouTube. > **get** **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:120](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L120) +Defined in: [src/parser/continuations.ts:120](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L120) ##### Returns @@ -90,7 +90,7 @@ Defined in: [src/parser/continuations.ts:120](https://github.com/LuanRT/YouTube. > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -132,7 +132,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -170,7 +170,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -208,7 +208,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/HTTPClient.md b/docs/api/classes/HTTPClient.md index c06ac856..af17f9e9 100644 --- a/docs/api/classes/HTTPClient.md +++ b/docs/api/classes/HTTPClient.md @@ -2,7 +2,7 @@ # Class: HTTPClient -Defined in: [src/utils/HTTPClient.ts:25](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/HTTPClient.ts#L25) +Defined in: [src/utils/HTTPClient.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/HTTPClient.ts#L25) ## Constructors @@ -10,7 +10,7 @@ Defined in: [src/utils/HTTPClient.ts:25](https://github.com/LuanRT/YouTube.js/bl > **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) +Defined in: [src/utils/HTTPClient.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/HTTPClient.ts#L30) #### Parameters @@ -38,7 +38,7 @@ Defined in: [src/utils/HTTPClient.ts:30](https://github.com/LuanRT/YouTube.js/bl > **get** **fetch\_function**(): \{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \} -Defined in: [src/utils/HTTPClient.ts:36](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/HTTPClient.ts#L36) +Defined in: [src/utils/HTTPClient.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/HTTPClient.ts#L36) ##### Returns @@ -84,7 +84,7 @@ Defined in: [src/utils/HTTPClient.ts:36](https://github.com/LuanRT/YouTube.js/bl > **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) +Defined in: [src/utils/HTTPClient.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/HTTPClient.ts#L40) #### Parameters diff --git a/docs/api/classes/Innertube.md b/docs/api/classes/Innertube.md index c525a558..a0f994d6 100644 --- a/docs/api/classes/Innertube.md +++ b/docs/api/classes/Innertube.md @@ -2,7 +2,7 @@ # Class: Innertube -Defined in: [src/Innertube.ts:64](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L64) +Defined in: [src/Innertube.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L64) Provides access to various services and modules in the YouTube API. @@ -19,7 +19,7 @@ const innertube = await Innertube.create({ cache: new UniversalCache(true)}); > **new Innertube**(`session`): `Innertube` -Defined in: [src/Innertube.ts:67](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L67) +Defined in: [src/Innertube.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L67) #### Parameters @@ -39,7 +39,7 @@ Defined in: [src/Innertube.ts:67](https://github.com/LuanRT/YouTube.js/blob/41b8 > **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) +Defined in: [src/Innertube.ts:609](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L609) An interface for managing and retrieving account information. @@ -55,7 +55,7 @@ An interface for managing and retrieving account information. > **get** **actions**(): [`Actions`](Actions.md) -Defined in: [src/Innertube.ts:630](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L630) +Defined in: [src/Innertube.ts:630](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L630) An internal class used to dispatch requests. @@ -71,7 +71,7 @@ An internal class used to dispatch requests. > **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) +Defined in: [src/Innertube.ts:623](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L623) An interface for directly interacting with certain YouTube features. @@ -87,7 +87,7 @@ An interface for directly interacting with certain YouTube features. > **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) +Defined in: [src/Innertube.ts:602](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L602) An interface for interacting with YouTube Kids. @@ -103,7 +103,7 @@ An interface for interacting with YouTube Kids. > **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) +Defined in: [src/Innertube.ts:588](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L588) An interface for interacting with YouTube Music. @@ -119,7 +119,7 @@ An interface for interacting with YouTube Music. > **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) +Defined in: [src/Innertube.ts:616](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L616) An interface for managing playlists. @@ -135,7 +135,7 @@ An interface for managing playlists. > **get** **session**(): [`Session`](Session.md) -Defined in: [src/Innertube.ts:637](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L637) +Defined in: [src/Innertube.ts:637](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L637) The session used by this instance. @@ -151,7 +151,7 @@ The session used by this instance. > **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) +Defined in: [src/Innertube.ts:595](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L595) An interface for interacting with YouTube Studio. @@ -167,7 +167,7 @@ An interface for interacting with YouTube Studio. > **call**\<`T`\>(`endpoint`, `args`): `Promise`\<`T`\> -Defined in: [src/Innertube.ts:579](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L579) +Defined in: [src/Innertube.ts:579](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L579) Utility method to call an endpoint without having to use [Actions](Actions.md). @@ -197,7 +197,7 @@ Utility method to call an endpoint without having to use [Actions](Actions.md). > **call**(`endpoint`, `args?`): `Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\> -Defined in: [src/Innertube.ts:580](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L580) +Defined in: [src/Innertube.ts:580](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L580) Utility method to call an endpoint without having to use [Actions](Actions.md). @@ -223,7 +223,7 @@ Utility method to call an endpoint without having to use [Actions](Actions.md). > **download**(`video_id`, `options?`): `Promise`\<`ReadableStream`\<`Uint8Array`\>\> -Defined in: [src/Innertube.ts:477](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L477) +Defined in: [src/Innertube.ts:477](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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). @@ -252,7 +252,7 @@ Download options. > **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) +Defined in: [src/Innertube.ts:565](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L565) Fetches an attestation challenge. @@ -276,7 +276,7 @@ Fetches an attestation challenge. > **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) +Defined in: [src/Innertube.ts:124](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L124) #### Parameters @@ -298,7 +298,7 @@ Defined in: [src/Innertube.ts:124](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:391](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L391) #### Parameters @@ -316,7 +316,7 @@ Defined in: [src/Innertube.ts:391](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:385](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L385) #### Returns @@ -328,7 +328,7 @@ Defined in: [src/Innertube.ts:385](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:306](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L306) #### Parameters @@ -354,7 +354,7 @@ Defined in: [src/Innertube.ts:306](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:373](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L373) #### Returns @@ -366,7 +366,7 @@ Defined in: [src/Innertube.ts:373](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:350](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L350) #### Returns @@ -378,7 +378,7 @@ Defined in: [src/Innertube.ts:350](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:436](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L436) #### Parameters @@ -396,7 +396,7 @@ Defined in: [src/Innertube.ts:436](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:361](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L361) #### Returns @@ -408,7 +408,7 @@ Defined in: [src/Innertube.ts:361](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:344](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L344) #### Returns @@ -420,7 +420,7 @@ Defined in: [src/Innertube.ts:344](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:75](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L75) #### Parameters @@ -442,7 +442,7 @@ Defined in: [src/Innertube.ts:75](https://github.com/LuanRT/YouTube.js/blob/41b8 > **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) +Defined in: [src/Innertube.ts:355](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L355) #### Returns @@ -454,7 +454,7 @@ Defined in: [src/Innertube.ts:355](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:403](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L403) #### Returns @@ -466,7 +466,7 @@ Defined in: [src/Innertube.ts:403](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:423](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L423) #### Parameters @@ -484,7 +484,7 @@ Defined in: [src/Innertube.ts:423](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:417](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L417) Retrieves the user's playlists. @@ -498,7 +498,7 @@ Retrieves the user's playlists. > **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) +Defined in: [src/Innertube.ts:497](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L497) Gets a post page given a post id and the channel id @@ -522,7 +522,7 @@ Gets a post page given a post id and the channel id > **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) +Defined in: [src/Innertube.ts:518](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L518) Gets the comments of a post. @@ -550,7 +550,7 @@ Gets the comments of a post. > **getSearchSuggestions**(`query`, `previous_query?`): `Promise`\<`string`[]\> -Defined in: [src/Innertube.ts:277](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L277) +Defined in: [src/Innertube.ts:277](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L277) #### Parameters @@ -572,7 +572,7 @@ Defined in: [src/Innertube.ts:277](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:166](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L166) #### Parameters @@ -594,7 +594,7 @@ Defined in: [src/Innertube.ts:166](https://github.com/LuanRT/YouTube.js/blob/41b > **getStreamingData**(`video_id`, `options`): `Promise`\<[`Format`](../youtubei.js/namespaces/Misc/classes/Format.md)\> -Defined in: [src/Innertube.ts:462](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L462) +Defined in: [src/Innertube.ts:462](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L462) An alternative to [download](#download). Returns deciphered streaming data. @@ -625,7 +625,7 @@ Format options. > **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) +Defined in: [src/Innertube.ts:379](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L379) #### Returns @@ -637,7 +637,7 @@ Defined in: [src/Innertube.ts:379](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:367](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L367) #### Returns @@ -649,7 +649,7 @@ Defined in: [src/Innertube.ts:367](https://github.com/LuanRT/YouTube.js/blob/41b > **getUnseenNotificationsCount**(): `Promise`\<`number`\> -Defined in: [src/Innertube.ts:408](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L408) +Defined in: [src/Innertube.ts:408](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L408) #### Returns @@ -661,7 +661,7 @@ Defined in: [src/Innertube.ts:408](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/Innertube.ts:485](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L485) Resolves the given URL. @@ -681,7 +681,7 @@ Resolves the given URL. > **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) +Defined in: [src/Innertube.ts:201](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L201) #### Parameters @@ -703,7 +703,7 @@ Defined in: [src/Innertube.ts:201](https://github.com/LuanRT/YouTube.js/blob/41b > `static` **create**(`config`): `Promise`\<`Innertube`\> -Defined in: [src/Innertube.ts:71](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L71) +Defined in: [src/Innertube.ts:71](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/Innertube.ts#L71) #### Parameters diff --git a/docs/api/classes/ItemSectionContinuation.md b/docs/api/classes/ItemSectionContinuation.md index d3067a53..c1b08aa3 100644 --- a/docs/api/classes/ItemSectionContinuation.md +++ b/docs/api/classes/ItemSectionContinuation.md @@ -2,7 +2,7 @@ # Class: ItemSectionContinuation -Defined in: [src/parser/continuations.ts:9](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L9) +Defined in: [src/parser/continuations.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L9) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:9](https://github.com/LuanRT/YouTube.js > **new ItemSectionContinuation**(`data`): `ItemSectionContinuation` -Defined in: [src/parser/continuations.ts:15](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L15) +Defined in: [src/parser/continuations.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L15) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:15](https://github.com/LuanRT/YouTube.j > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L12) +Defined in: [src/parser/continuations.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L12) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:12](https://github.com/LuanRT/YouTube.j > `optional` **continuation**: `string` -Defined in: [src/parser/continuations.ts:13](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L13) +Defined in: [src/parser/continuations.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L13) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:13](https://github.com/LuanRT/YouTube.j > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -64,7 +64,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L10) #### Overrides @@ -76,7 +76,7 @@ Defined in: [src/parser/continuations.ts:10](https://github.com/LuanRT/YouTube.j > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -118,7 +118,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -156,7 +156,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -194,7 +194,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/LiveChatContinuation.md b/docs/api/classes/LiveChatContinuation.md index 6277412c..5ea43215 100644 --- a/docs/api/classes/LiveChatContinuation.md +++ b/docs/api/classes/LiveChatContinuation.md @@ -2,7 +2,7 @@ # Class: LiveChatContinuation -Defined in: [src/parser/continuations.ts:156](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L156) +Defined in: [src/parser/continuations.ts:156](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L156) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:156](https://github.com/LuanRT/YouTube. > **new LiveChatContinuation**(`data`): `LiveChatContinuation` -Defined in: [src/parser/continuations.ts:174](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L174) +Defined in: [src/parser/continuations.ts:174](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L174) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:174](https://github.com/LuanRT/YouTube. > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L160) +Defined in: [src/parser/continuations.ts:160](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L160) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:160](https://github.com/LuanRT/YouTube. > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L159) +Defined in: [src/parser/continuations.ts:159](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L159) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:159](https://github.com/LuanRT/YouTube. > **continuation**: [`Continuation`](Continuation.md) -Defined in: [src/parser/continuations.ts:171](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L171) +Defined in: [src/parser/continuations.ts:171](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L171) *** @@ -60,7 +60,7 @@ Defined in: [src/parser/continuations.ts:171](https://github.com/LuanRT/YouTube. > **emojis**: `object`[] -Defined in: [src/parser/continuations.ts:165](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L165) +Defined in: [src/parser/continuations.ts:165](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L165) #### emoji\_id @@ -84,7 +84,7 @@ Defined in: [src/parser/continuations.ts:165](https://github.com/LuanRT/YouTube. > **header**: [`LiveChatHeader`](../youtubei.js/namespaces/YTNodes/classes/LiveChatHeader.md) \| `null` -Defined in: [src/parser/continuations.ts:162](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L162) +Defined in: [src/parser/continuations.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L162) *** @@ -92,7 +92,7 @@ Defined in: [src/parser/continuations.ts:162](https://github.com/LuanRT/YouTube. > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L161) +Defined in: [src/parser/continuations.ts:161](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L161) *** @@ -100,7 +100,7 @@ Defined in: [src/parser/continuations.ts:161](https://github.com/LuanRT/YouTube. > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L163) +Defined in: [src/parser/continuations.ts:163](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L163) *** @@ -108,7 +108,7 @@ Defined in: [src/parser/continuations.ts:163](https://github.com/LuanRT/YouTube. > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L164) +Defined in: [src/parser/continuations.ts:164](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L164) *** @@ -116,7 +116,7 @@ Defined in: [src/parser/continuations.ts:164](https://github.com/LuanRT/YouTube. > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -128,7 +128,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > **viewer\_name**: `string` -Defined in: [src/parser/continuations.ts:172](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L172) +Defined in: [src/parser/continuations.ts:172](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L172) *** @@ -136,7 +136,7 @@ Defined in: [src/parser/continuations.ts:172](https://github.com/LuanRT/YouTube. > `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) +Defined in: [src/parser/continuations.ts:157](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L157) #### Overrides @@ -148,7 +148,7 @@ Defined in: [src/parser/continuations.ts:157](https://github.com/LuanRT/YouTube. > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -190,7 +190,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -228,7 +228,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -266,7 +266,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/MusicPlaylistShelfContinuation.md b/docs/api/classes/MusicPlaylistShelfContinuation.md index 9f9ceef3..e1c2910b 100644 --- a/docs/api/classes/MusicPlaylistShelfContinuation.md +++ b/docs/api/classes/MusicPlaylistShelfContinuation.md @@ -2,7 +2,7 @@ # Class: MusicPlaylistShelfContinuation -Defined in: [src/parser/continuations.ts:80](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L80) +Defined in: [src/parser/continuations.ts:80](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L80) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:80](https://github.com/LuanRT/YouTube.j > **new MusicPlaylistShelfContinuation**(`data`): `MusicPlaylistShelfContinuation` -Defined in: [src/parser/continuations.ts:86](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L86) +Defined in: [src/parser/continuations.ts:86](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L86) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:86](https://github.com/LuanRT/YouTube.j > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L84) +Defined in: [src/parser/continuations.ts:84](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L84) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:84](https://github.com/LuanRT/YouTube.j > **continuation**: `string` -Defined in: [src/parser/continuations.ts:83](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L83) +Defined in: [src/parser/continuations.ts:83](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L83) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:83](https://github.com/LuanRT/YouTube.j > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -64,7 +64,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:81](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L81) #### Overrides @@ -76,7 +76,7 @@ Defined in: [src/parser/continuations.ts:81](https://github.com/LuanRT/YouTube.j > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -118,7 +118,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -156,7 +156,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -194,7 +194,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/MusicShelfContinuation.md b/docs/api/classes/MusicShelfContinuation.md index aed6bf4b..4b2e8434 100644 --- a/docs/api/classes/MusicShelfContinuation.md +++ b/docs/api/classes/MusicShelfContinuation.md @@ -2,7 +2,7 @@ # Class: MusicShelfContinuation -Defined in: [src/parser/continuations.ts:93](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L93) +Defined in: [src/parser/continuations.ts:93](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L93) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:93](https://github.com/LuanRT/YouTube.j > **new MusicShelfContinuation**(`data`): `MusicShelfContinuation` -Defined in: [src/parser/continuations.ts:99](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L99) +Defined in: [src/parser/continuations.ts:99](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L99) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:99](https://github.com/LuanRT/YouTube.j > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L97) +Defined in: [src/parser/continuations.ts:97](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L97) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:97](https://github.com/LuanRT/YouTube.j > **continuation**: `string` -Defined in: [src/parser/continuations.ts:96](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L96) +Defined in: [src/parser/continuations.ts:96](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L96) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:96](https://github.com/LuanRT/YouTube.j > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -64,7 +64,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L94) #### Overrides @@ -76,7 +76,7 @@ Defined in: [src/parser/continuations.ts:94](https://github.com/LuanRT/YouTube.j > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -118,7 +118,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -156,7 +156,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -194,7 +194,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/NavigateAction.md b/docs/api/classes/NavigateAction.md index c4f90338..443381a8 100644 --- a/docs/api/classes/NavigateAction.md +++ b/docs/api/classes/NavigateAction.md @@ -2,7 +2,7 @@ # Class: NavigateAction -Defined in: [src/parser/continuations.ts:24](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L24) +Defined in: [src/parser/continuations.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L24) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:24](https://github.com/LuanRT/YouTube.j > **new NavigateAction**(`data`): `NavigateAction` -Defined in: [src/parser/continuations.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L29) +Defined in: [src/parser/continuations.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L29) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:29](https://github.com/LuanRT/YouTube.j > **endpoint**: [`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md) -Defined in: [src/parser/continuations.ts:27](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L27) +Defined in: [src/parser/continuations.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L27) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:27](https://github.com/LuanRT/YouTube.j > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -56,7 +56,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L25) #### Overrides @@ -68,7 +68,7 @@ Defined in: [src/parser/continuations.ts:25](https://github.com/LuanRT/YouTube.j > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -110,7 +110,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -148,7 +148,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -186,7 +186,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/OAuth2.md b/docs/api/classes/OAuth2.md index 8ca9e73f..4a43f6f2 100644 --- a/docs/api/classes/OAuth2.md +++ b/docs/api/classes/OAuth2.md @@ -2,7 +2,7 @@ # Class: OAuth2 -Defined in: [src/core/OAuth2.ts:35](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L35) +Defined in: [src/core/OAuth2.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L35) ## Constructors @@ -10,7 +10,7 @@ Defined in: [src/core/OAuth2.ts:35](https://github.com/LuanRT/YouTube.js/blob/41 > **new OAuth2**(`session`): `OAuth2` -Defined in: [src/core/OAuth2.ts:46](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L46) +Defined in: [src/core/OAuth2.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L46) #### Parameters @@ -28,7 +28,7 @@ Defined in: [src/core/OAuth2.ts:46](https://github.com/LuanRT/YouTube.js/blob/41 > **AUTH\_SERVER\_CODE\_URL**: `URL` -Defined in: [src/core/OAuth2.ts:39](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L39) +Defined in: [src/core/OAuth2.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L39) *** @@ -36,7 +36,7 @@ Defined in: [src/core/OAuth2.ts:39](https://github.com/LuanRT/YouTube.js/blob/41 > **AUTH\_SERVER\_REVOKE\_TOKEN\_URL**: `URL` -Defined in: [src/core/OAuth2.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L41) +Defined in: [src/core/OAuth2.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L41) *** @@ -44,7 +44,7 @@ Defined in: [src/core/OAuth2.ts:41](https://github.com/LuanRT/YouTube.js/blob/41 > **AUTH\_SERVER\_TOKEN\_URL**: `URL` -Defined in: [src/core/OAuth2.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L40) +Defined in: [src/core/OAuth2.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L40) *** @@ -52,7 +52,7 @@ Defined in: [src/core/OAuth2.ts:40](https://github.com/LuanRT/YouTube.js/blob/41 > **client\_id**: [`OAuth2ClientID`](../type-aliases/OAuth2ClientID.md) \| `undefined` -Defined in: [src/core/OAuth2.ts:43](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L43) +Defined in: [src/core/OAuth2.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L43) *** @@ -60,7 +60,7 @@ Defined in: [src/core/OAuth2.ts:43](https://github.com/LuanRT/YouTube.js/blob/41 > **oauth2\_tokens**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md) \| `undefined` -Defined in: [src/core/OAuth2.ts:44](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L44) +Defined in: [src/core/OAuth2.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L44) *** @@ -68,7 +68,7 @@ Defined in: [src/core/OAuth2.ts:44](https://github.com/LuanRT/YouTube.js/blob/41 > **YTTV\_URL**: `URL` -Defined in: [src/core/OAuth2.ts:38](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L38) +Defined in: [src/core/OAuth2.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L38) ## Methods @@ -76,7 +76,7 @@ Defined in: [src/core/OAuth2.ts:38](https://github.com/LuanRT/YouTube.js/blob/41 > **cacheCredentials**(): `Promise`\<`void`\> -Defined in: [src/core/OAuth2.ts:105](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L105) +Defined in: [src/core/OAuth2.ts:105](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L105) #### Returns @@ -88,7 +88,7 @@ Defined in: [src/core/OAuth2.ts:105](https://github.com/LuanRT/YouTube.js/blob/4 > **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) +Defined in: [src/core/OAuth2.ts:268](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L268) #### Returns @@ -100,7 +100,7 @@ Defined in: [src/core/OAuth2.ts:268](https://github.com/LuanRT/YouTube.js/blob/4 > **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) +Defined in: [src/core/OAuth2.ts:236](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L236) #### Returns @@ -112,7 +112,7 @@ Defined in: [src/core/OAuth2.ts:236](https://github.com/LuanRT/YouTube.js/blob/4 > **init**(`tokens?`): `Promise`\<`void`\> -Defined in: [src/core/OAuth2.ts:54](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L54) +Defined in: [src/core/OAuth2.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L54) #### Parameters @@ -130,7 +130,7 @@ Defined in: [src/core/OAuth2.ts:54](https://github.com/LuanRT/YouTube.js/blob/41 > **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) +Defined in: [src/core/OAuth2.ts:130](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L130) #### Parameters @@ -148,7 +148,7 @@ Defined in: [src/core/OAuth2.ts:130](https://github.com/LuanRT/YouTube.js/blob/4 > **refreshAccessToken**(): `Promise`\<`void`\> -Defined in: [src/core/OAuth2.ts:197](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L197) +Defined in: [src/core/OAuth2.ts:197](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L197) #### Returns @@ -160,7 +160,7 @@ Defined in: [src/core/OAuth2.ts:197](https://github.com/LuanRT/YouTube.js/blob/4 > **removeCache**(): `Promise`\<`void`\> -Defined in: [src/core/OAuth2.ts:126](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L126) +Defined in: [src/core/OAuth2.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L126) #### Returns @@ -172,7 +172,7 @@ Defined in: [src/core/OAuth2.ts:126](https://github.com/LuanRT/YouTube.js/blob/4 > **revokeCredentials**(): `Promise`\<`Response` \| `undefined`\> -Defined in: [src/core/OAuth2.ts:185](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L185) +Defined in: [src/core/OAuth2.ts:185](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L185) #### Returns @@ -184,7 +184,7 @@ Defined in: [src/core/OAuth2.ts:185](https://github.com/LuanRT/YouTube.js/blob/4 > **setTokens**(`tokens`): `void` -Defined in: [src/core/OAuth2.ts:85](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L85) +Defined in: [src/core/OAuth2.ts:85](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L85) #### Parameters @@ -202,7 +202,7 @@ Defined in: [src/core/OAuth2.ts:85](https://github.com/LuanRT/YouTube.js/blob/41 > **shouldRefreshToken**(): `boolean` -Defined in: [src/core/OAuth2.ts:313](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L313) +Defined in: [src/core/OAuth2.ts:313](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L313) #### Returns @@ -214,7 +214,7 @@ Defined in: [src/core/OAuth2.ts:313](https://github.com/LuanRT/YouTube.js/blob/4 > **validateTokens**(`tokens`): `boolean` -Defined in: [src/core/OAuth2.ts:319](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L319) +Defined in: [src/core/OAuth2.ts:319](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L319) #### Parameters diff --git a/docs/api/classes/Platform.md b/docs/api/classes/Platform.md index 4e7a3d32..defd9e15 100644 --- a/docs/api/classes/Platform.md +++ b/docs/api/classes/Platform.md @@ -2,7 +2,7 @@ # Class: Platform -Defined in: [src/utils/Utils.ts:15](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Utils.ts#L15) +Defined in: [src/utils/Utils.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L15) ## Constructors @@ -22,7 +22,7 @@ Defined in: [src/utils/Utils.ts:15](https://github.com/LuanRT/YouTube.js/blob/41 > **get** `static` **shim**(): [`PlatformShim`](../youtubei.js/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: [src/utils/Utils.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L20) ##### Returns @@ -34,7 +34,7 @@ Defined in: [src/utils/Utils.ts:20](https://github.com/LuanRT/YouTube.js/blob/41 > `static` **load**(`platform`): `void` -Defined in: [src/utils/Utils.ts:16](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Utils.ts#L16) +Defined in: [src/utils/Utils.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L16) #### Parameters diff --git a/docs/api/classes/Player.md b/docs/api/classes/Player.md index 6c4bd055..6c43280f 100644 --- a/docs/api/classes/Player.md +++ b/docs/api/classes/Player.md @@ -2,7 +2,7 @@ # Class: Player -Defined in: [src/core/Player.ts:37](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L37) +Defined in: [src/core/Player.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L37) Represents YouTube's player script. This is required to decipher signatures. @@ -12,7 +12,7 @@ Represents YouTube's player script. This is required to decipher signatures. > **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) +Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L40) #### Parameters @@ -38,7 +38,7 @@ Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41 > `optional` **data**: [`BuildScriptResult`](../youtubei.js/namespaces/Types/interfaces/BuildScriptResult.md) -Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L40) +Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L40) *** @@ -46,7 +46,7 @@ Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41 > **player\_id**: `string` -Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L40) +Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L40) *** @@ -54,7 +54,7 @@ Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41 > `optional` **po\_token**: `string` -Defined in: [src/core/Player.ts:38](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L38) +Defined in: [src/core/Player.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L38) *** @@ -62,7 +62,7 @@ Defined in: [src/core/Player.ts:38](https://github.com/LuanRT/YouTube.js/blob/41 > **signature\_timestamp**: `number` -Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L40) +Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L40) ## Accessors @@ -72,7 +72,7 @@ Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41 > **get** **url**(): `string` -Defined in: [src/core/Player.ts:284](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L284) +Defined in: [src/core/Player.ts:284](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L284) ##### Returns @@ -86,7 +86,7 @@ Defined in: [src/core/Player.ts:284](https://github.com/LuanRT/YouTube.js/blob/4 > **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) +Defined in: [src/core/Player.ts:288](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L288) ##### Returns @@ -98,7 +98,7 @@ Defined in: [src/core/Player.ts:288](https://github.com/LuanRT/YouTube.js/blob/4 > **cache**(`cache?`): `Promise`\<`void`\> -Defined in: [src/core/Player.ts:270](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L270) +Defined in: [src/core/Player.ts:270](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L270) #### Parameters @@ -116,7 +116,7 @@ Defined in: [src/core/Player.ts:270](https://github.com/LuanRT/YouTube.js/blob/4 > **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) +Defined in: [src/core/Player.ts:134](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L134) #### Parameters @@ -146,7 +146,7 @@ Defined in: [src/core/Player.ts:134](https://github.com/LuanRT/YouTube.js/blob/4 > `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) +Defined in: [src/core/Player.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L42) #### Parameters @@ -176,7 +176,7 @@ Defined in: [src/core/Player.ts:42](https://github.com/LuanRT/YouTube.js/blob/41 > `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) +Defined in: [src/core/Player.ts:243](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L243) #### Parameters @@ -198,7 +198,7 @@ Defined in: [src/core/Player.ts:243](https://github.com/LuanRT/YouTube.js/blob/4 > `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) +Defined in: [src/core/Player.ts:264](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Player.ts#L264) #### Parameters diff --git a/docs/api/classes/PlaylistPanelContinuation.md b/docs/api/classes/PlaylistPanelContinuation.md index 02264a1e..092c98ef 100644 --- a/docs/api/classes/PlaylistPanelContinuation.md +++ b/docs/api/classes/PlaylistPanelContinuation.md @@ -2,7 +2,7 @@ # Class: PlaylistPanelContinuation -Defined in: [src/parser/continuations.ts:125](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L125) +Defined in: [src/parser/continuations.ts:125](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L125) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:125](https://github.com/LuanRT/YouTube. > **new PlaylistPanelContinuation**(`data`): `PlaylistPanelContinuation` -Defined in: [src/parser/continuations.ts:131](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L131) +Defined in: [src/parser/continuations.ts:131](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L131) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:131](https://github.com/LuanRT/YouTube. > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L129) +Defined in: [src/parser/continuations.ts:129](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L129) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:129](https://github.com/LuanRT/YouTube. > **continuation**: `string` -Defined in: [src/parser/continuations.ts:128](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L128) +Defined in: [src/parser/continuations.ts:128](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L128) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:128](https://github.com/LuanRT/YouTube. > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -64,7 +64,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L126) #### Overrides @@ -76,7 +76,7 @@ Defined in: [src/parser/continuations.ts:126](https://github.com/LuanRT/YouTube. > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -118,7 +118,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -156,7 +156,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -194,7 +194,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/ReloadContinuationItemsCommand.md b/docs/api/classes/ReloadContinuationItemsCommand.md index 89b879dd..24df7caa 100644 --- a/docs/api/classes/ReloadContinuationItemsCommand.md +++ b/docs/api/classes/ReloadContinuationItemsCommand.md @@ -2,7 +2,7 @@ # Class: ReloadContinuationItemsCommand -Defined in: [src/parser/continuations.ts:50](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L50) +Defined in: [src/parser/continuations.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L50) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:50](https://github.com/LuanRT/YouTube.j > **new ReloadContinuationItemsCommand**(`data`): `ReloadContinuationItemsCommand` -Defined in: [src/parser/continuations.ts:57](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L57) +Defined in: [src/parser/continuations.ts:57](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L57) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:57](https://github.com/LuanRT/YouTube.j > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L54) +Defined in: [src/parser/continuations.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L54) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:54](https://github.com/LuanRT/YouTube.j > `optional` **slot**: `string` -Defined in: [src/parser/continuations.ts:55](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L55) +Defined in: [src/parser/continuations.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L55) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:55](https://github.com/LuanRT/YouTube.j > **target\_id**: `string` -Defined in: [src/parser/continuations.ts:53](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L53) +Defined in: [src/parser/continuations.ts:53](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L53) *** @@ -60,7 +60,7 @@ Defined in: [src/parser/continuations.ts:53](https://github.com/LuanRT/YouTube.j > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -72,7 +72,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L51) #### Overrides @@ -84,7 +84,7 @@ Defined in: [src/parser/continuations.ts:51](https://github.com/LuanRT/YouTube.j > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -126,7 +126,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -164,7 +164,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -202,7 +202,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/SectionListContinuation.md b/docs/api/classes/SectionListContinuation.md index 2160a23e..ad30b840 100644 --- a/docs/api/classes/SectionListContinuation.md +++ b/docs/api/classes/SectionListContinuation.md @@ -2,7 +2,7 @@ # Class: SectionListContinuation -Defined in: [src/parser/continuations.ts:65](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L65) +Defined in: [src/parser/continuations.ts:65](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L65) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:65](https://github.com/LuanRT/YouTube.j > **new SectionListContinuation**(`data`): `SectionListContinuation` -Defined in: [src/parser/continuations.ts:71](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L71) +Defined in: [src/parser/continuations.ts:71](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L71) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:71](https://github.com/LuanRT/YouTube.j > **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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L69) +Defined in: [src/parser/continuations.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L69) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:69](https://github.com/LuanRT/YouTube.j > **continuation**: `string` -Defined in: [src/parser/continuations.ts:68](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L68) +Defined in: [src/parser/continuations.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L68) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:68](https://github.com/LuanRT/YouTube.j > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -64,7 +64,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:66](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L66) #### Overrides @@ -76,7 +76,7 @@ Defined in: [src/parser/continuations.ts:66](https://github.com/LuanRT/YouTube.j > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -118,7 +118,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -156,7 +156,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -194,7 +194,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/Session.md b/docs/api/classes/Session.md index d4d92fbd..6aa7f751 100644 --- a/docs/api/classes/Session.md +++ b/docs/api/classes/Session.md @@ -2,7 +2,7 @@ # Class: Session -Defined in: [src/core/Session.ts:251](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L251) +Defined in: [src/core/Session.ts:251](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L251) Represents an InnerTube session. This holds all the data needed to make requests to YouTube. @@ -16,7 +16,7 @@ Represents an InnerTube session. This holds all the data needed to make requests > **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) +Defined in: [src/core/Session.ts:258](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L258) #### Parameters @@ -74,7 +74,7 @@ Defined in: [src/core/Session.ts:258](https://github.com/LuanRT/YouTube.js/blob/ > **account\_index**: `number` -Defined in: [src/core/Session.ts:262](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L262) +Defined in: [src/core/Session.ts:262](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L262) *** @@ -82,7 +82,7 @@ Defined in: [src/core/Session.ts:262](https://github.com/LuanRT/YouTube.js/blob/ > **actions**: [`Actions`](Actions.md) -Defined in: [src/core/Session.ts:255](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L255) +Defined in: [src/core/Session.ts:255](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L255) *** @@ -90,7 +90,7 @@ Defined in: [src/core/Session.ts:255](https://github.com/LuanRT/YouTube.js/blob/ > **api\_key**: `string` -Defined in: [src/core/Session.ts:260](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L260) +Defined in: [src/core/Session.ts:260](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L260) *** @@ -98,7 +98,7 @@ Defined in: [src/core/Session.ts:260](https://github.com/LuanRT/YouTube.js/blob/ > **api\_version**: `string` -Defined in: [src/core/Session.ts:261](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L261) +Defined in: [src/core/Session.ts:261](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L261) *** @@ -106,7 +106,7 @@ Defined in: [src/core/Session.ts:261](https://github.com/LuanRT/YouTube.js/blob/ > `optional` **cache**: [`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md) -Defined in: [src/core/Session.ts:267](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L267) +Defined in: [src/core/Session.ts:267](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L267) *** @@ -114,7 +114,7 @@ Defined in: [src/core/Session.ts:267](https://github.com/LuanRT/YouTube.js/blob/ > `optional` **config\_data**: `string` -Defined in: [src/core/Session.ts:263](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L263) +Defined in: [src/core/Session.ts:263](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L263) *** @@ -122,7 +122,7 @@ Defined in: [src/core/Session.ts:263](https://github.com/LuanRT/YouTube.js/blob/ > **context**: [`Context`](../type-aliases/Context.md) -Defined in: [src/core/Session.ts:259](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L259) +Defined in: [src/core/Session.ts:259](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L259) *** @@ -130,7 +130,7 @@ Defined in: [src/core/Session.ts:259](https://github.com/LuanRT/YouTube.js/blob/ > `optional` **cookie**: `string` -Defined in: [src/core/Session.ts:265](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L265) +Defined in: [src/core/Session.ts:265](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L265) *** @@ -138,7 +138,7 @@ Defined in: [src/core/Session.ts:265](https://github.com/LuanRT/YouTube.js/blob/ > **http**: [`HTTPClient`](HTTPClient.md) -Defined in: [src/core/Session.ts:253](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L253) +Defined in: [src/core/Session.ts:253](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L253) *** @@ -146,7 +146,7 @@ Defined in: [src/core/Session.ts:253](https://github.com/LuanRT/YouTube.js/blob/ > **logged\_in**: `boolean` -Defined in: [src/core/Session.ts:254](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L254) +Defined in: [src/core/Session.ts:254](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L254) *** @@ -154,7 +154,7 @@ Defined in: [src/core/Session.ts:254](https://github.com/LuanRT/YouTube.js/blob/ > **oauth**: [`OAuth2`](OAuth2.md) -Defined in: [src/core/Session.ts:252](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L252) +Defined in: [src/core/Session.ts:252](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L252) *** @@ -162,7 +162,7 @@ Defined in: [src/core/Session.ts:252](https://github.com/LuanRT/YouTube.js/blob/ > `optional` **player**: [`Player`](Player.md) -Defined in: [src/core/Session.ts:264](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L264) +Defined in: [src/core/Session.ts:264](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L264) *** @@ -170,7 +170,7 @@ Defined in: [src/core/Session.ts:264](https://github.com/LuanRT/YouTube.js/blob/ > `optional` **po\_token**: `string` -Defined in: [src/core/Session.ts:268](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L268) +Defined in: [src/core/Session.ts:268](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L268) *** @@ -178,7 +178,7 @@ Defined in: [src/core/Session.ts:268](https://github.com/LuanRT/YouTube.js/blob/ > `optional` **user\_agent**: `string` -Defined in: [src/core/Session.ts:256](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L256) +Defined in: [src/core/Session.ts:256](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L256) ## Accessors @@ -188,7 +188,7 @@ Defined in: [src/core/Session.ts:256](https://github.com/LuanRT/YouTube.js/blob/ > **get** **client\_name**(): `string` -Defined in: [src/core/Session.ts:688](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L688) +Defined in: [src/core/Session.ts:688](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L688) ##### Returns @@ -202,7 +202,7 @@ Defined in: [src/core/Session.ts:688](https://github.com/LuanRT/YouTube.js/blob/ > **get** **client\_version**(): `string` -Defined in: [src/core/Session.ts:684](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L684) +Defined in: [src/core/Session.ts:684](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L684) ##### Returns @@ -216,7 +216,7 @@ Defined in: [src/core/Session.ts:684](https://github.com/LuanRT/YouTube.js/blob/ > **get** **lang**(): `string` -Defined in: [src/core/Session.ts:692](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L692) +Defined in: [src/core/Session.ts:692](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L692) ##### Returns @@ -300,7 +300,7 @@ Dispatches a synthetic event event to target and returns true if either event's > **emit**(`type`, ...`args`): `void` -Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L10) +Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L10) #### Parameters @@ -326,7 +326,7 @@ Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube > **off**(`type`, `listener`): `void` -Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L40) +Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L40) #### Parameters @@ -354,7 +354,7 @@ Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube > **on**(`type`, `listener`): `void` -Defined in: [src/core/Session.ts:278](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L278) +Defined in: [src/core/Session.ts:278](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L278) ##### Parameters @@ -378,7 +378,7 @@ Defined in: [src/core/Session.ts:278](https://github.com/LuanRT/YouTube.js/blob/ > **on**(`type`, `listener`): `void` -Defined in: [src/core/Session.ts:279](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L279) +Defined in: [src/core/Session.ts:279](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L279) ##### Parameters @@ -402,7 +402,7 @@ Defined in: [src/core/Session.ts:279](https://github.com/LuanRT/YouTube.js/blob/ > **on**(`type`, `listener`): `void` -Defined in: [src/core/Session.ts:280](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L280) +Defined in: [src/core/Session.ts:280](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L280) ##### Parameters @@ -426,7 +426,7 @@ Defined in: [src/core/Session.ts:280](https://github.com/LuanRT/YouTube.js/blob/ > **on**(`type`, `listener`): `void` -Defined in: [src/core/Session.ts:281](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L281) +Defined in: [src/core/Session.ts:281](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L281) ##### Parameters @@ -454,7 +454,7 @@ Defined in: [src/core/Session.ts:281](https://github.com/LuanRT/YouTube.js/blob/ > **once**(`type`, `listener`): `void` -Defined in: [src/core/Session.ts:287](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L287) +Defined in: [src/core/Session.ts:287](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L287) ##### Parameters @@ -478,7 +478,7 @@ Defined in: [src/core/Session.ts:287](https://github.com/LuanRT/YouTube.js/blob/ > **once**(`type`, `listener`): `void` -Defined in: [src/core/Session.ts:288](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L288) +Defined in: [src/core/Session.ts:288](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L288) ##### Parameters @@ -502,7 +502,7 @@ Defined in: [src/core/Session.ts:288](https://github.com/LuanRT/YouTube.js/blob/ > **once**(`type`, `listener`): `void` -Defined in: [src/core/Session.ts:289](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L289) +Defined in: [src/core/Session.ts:289](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L289) ##### Parameters @@ -562,7 +562,7 @@ Removes the event listener in target's event listener list with the same type, c > **signIn**(`credentials?`): `Promise`\<`void`\> -Defined in: [src/core/Session.ts:651](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L651) +Defined in: [src/core/Session.ts:651](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L651) #### Parameters @@ -580,7 +580,7 @@ Defined in: [src/core/Session.ts:651](https://github.com/LuanRT/YouTube.js/blob/ > **signOut**(): `Promise`\<`Response` \| `undefined`\> -Defined in: [src/core/Session.ts:674](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L674) +Defined in: [src/core/Session.ts:674](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L674) Signs out of the current account and revokes the credentials. @@ -594,7 +594,7 @@ Signs out of the current account and revokes the credentials. > `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) +Defined in: [src/core/Session.ts:295](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L295) #### Parameters @@ -612,7 +612,7 @@ Defined in: [src/core/Session.ts:295](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/core/Session.ts:327](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L327) Retrieves session data from cache. @@ -640,7 +640,7 @@ User provided session arguments. > `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) +Defined in: [src/core/Session.ts:376](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L376) #### Parameters diff --git a/docs/api/classes/ShowMiniplayerCommand.md b/docs/api/classes/ShowMiniplayerCommand.md index 7e4ff19e..cf86a2ae 100644 --- a/docs/api/classes/ShowMiniplayerCommand.md +++ b/docs/api/classes/ShowMiniplayerCommand.md @@ -2,7 +2,7 @@ # Class: ShowMiniplayerCommand -Defined in: [src/parser/continuations.ts:35](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L35) +Defined in: [src/parser/continuations.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L35) ## Extends @@ -14,7 +14,7 @@ Defined in: [src/parser/continuations.ts:35](https://github.com/LuanRT/YouTube.j > **new ShowMiniplayerCommand**(`data`): `ShowMiniplayerCommand` -Defined in: [src/parser/continuations.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L41) +Defined in: [src/parser/continuations.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L41) #### Parameters @@ -36,7 +36,7 @@ Defined in: [src/parser/continuations.ts:41](https://github.com/LuanRT/YouTube.j > **miniplayer\_command**: [`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md) -Defined in: [src/parser/continuations.ts:38](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L38) +Defined in: [src/parser/continuations.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L38) *** @@ -44,7 +44,7 @@ Defined in: [src/parser/continuations.ts:38](https://github.com/LuanRT/YouTube.j > **show\_premium\_branding**: `boolean` -Defined in: [src/parser/continuations.ts:39](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L39) +Defined in: [src/parser/continuations.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L39) *** @@ -52,7 +52,7 @@ Defined in: [src/parser/continuations.ts:39](https://github.com/LuanRT/YouTube.j > `readonly` **type**: `string` -Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) #### Inherited from @@ -64,7 +64,7 @@ Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/ > `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) +Defined in: [src/parser/continuations.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/continuations.ts#L36) #### Overrides @@ -76,7 +76,7 @@ Defined in: [src/parser/continuations.ts:36](https://github.com/LuanRT/YouTube.j > **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) +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) Cast to one of the given types. @@ -118,7 +118,7 @@ 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) +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) Check for a key without asserting the type. @@ -156,7 +156,7 @@ Whether the node has the key > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` -Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19) +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) Check if the node is of the given type. @@ -194,7 +194,7 @@ whether the node is of the given type > **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) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) Assert that the node has the given key and return it. diff --git a/docs/api/classes/UniversalCache.md b/docs/api/classes/UniversalCache.md index 04bc18d4..67a5d6b6 100644 --- a/docs/api/classes/UniversalCache.md +++ b/docs/api/classes/UniversalCache.md @@ -2,7 +2,7 @@ # Class: UniversalCache -Defined in: [src/utils/Cache.ts:4](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L4) +Defined in: [src/utils/Cache.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Cache.ts#L4) ## Implements @@ -14,7 +14,7 @@ Defined in: [src/utils/Cache.ts:4](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/utils/Cache.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Cache.ts#L6) #### Parameters @@ -38,7 +38,7 @@ Defined in: [src/utils/Cache.ts:6](https://github.com/LuanRT/YouTube.js/blob/41b > **get** **cache\_dir**(): `string` -Defined in: [src/utils/Cache.ts:9](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L9) +Defined in: [src/utils/Cache.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Cache.ts#L9) ##### Returns @@ -54,7 +54,7 @@ Defined in: [src/utils/Cache.ts:9](https://github.com/LuanRT/YouTube.js/blob/41b > **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) +Defined in: [src/utils/Cache.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Cache.ts#L12) #### Parameters @@ -76,7 +76,7 @@ Defined in: [src/utils/Cache.ts:12](https://github.com/LuanRT/YouTube.js/blob/41 > **remove**(`key`): `Promise`\<`void`\> -Defined in: [src/utils/Cache.ts:18](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L18) +Defined in: [src/utils/Cache.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Cache.ts#L18) #### Parameters @@ -98,7 +98,7 @@ Defined in: [src/utils/Cache.ts:18](https://github.com/LuanRT/YouTube.js/blob/41 > **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) +Defined in: [src/utils/Cache.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Cache.ts#L15) #### Parameters diff --git a/docs/api/enumerations/ClientType.md b/docs/api/enumerations/ClientType.md index 1cbcb0fa..8511bb3f 100644 --- a/docs/api/enumerations/ClientType.md +++ b/docs/api/enumerations/ClientType.md @@ -2,7 +2,7 @@ # Enumeration: ClientType -Defined in: [src/core/Session.ts:22](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L22) +Defined in: [src/core/Session.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L22) ## Enumeration Members @@ -10,7 +10,7 @@ Defined in: [src/core/Session.ts:22](https://github.com/LuanRT/YouTube.js/blob/4 > **ANDROID**: `"ANDROID"` -Defined in: [src/core/Session.ts:28](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L28) +Defined in: [src/core/Session.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L28) *** @@ -18,7 +18,7 @@ Defined in: [src/core/Session.ts:28](https://github.com/LuanRT/YouTube.js/blob/4 > **ANDROID\_CREATOR**: `"ANDROID_CREATOR"` -Defined in: [src/core/Session.ts:30](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L30) +Defined in: [src/core/Session.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L30) *** @@ -26,7 +26,7 @@ Defined in: [src/core/Session.ts:30](https://github.com/LuanRT/YouTube.js/blob/4 > **ANDROID\_MUSIC**: `"ANDROID_MUSIC"` -Defined in: [src/core/Session.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L29) +Defined in: [src/core/Session.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L29) *** @@ -34,7 +34,7 @@ Defined in: [src/core/Session.ts:29](https://github.com/LuanRT/YouTube.js/blob/4 > **IOS**: `"iOS"` -Defined in: [src/core/Session.ts:27](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L27) +Defined in: [src/core/Session.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L27) *** @@ -42,7 +42,7 @@ Defined in: [src/core/Session.ts:27](https://github.com/LuanRT/YouTube.js/blob/4 > **KIDS**: `"WEB_KIDS"` -Defined in: [src/core/Session.ts:25](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L25) +Defined in: [src/core/Session.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L25) *** @@ -50,7 +50,7 @@ Defined in: [src/core/Session.ts:25](https://github.com/LuanRT/YouTube.js/blob/4 > **MUSIC**: `"WEB_REMIX"` -Defined in: [src/core/Session.ts:26](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L26) +Defined in: [src/core/Session.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L26) *** @@ -58,7 +58,7 @@ Defined in: [src/core/Session.ts:26](https://github.com/LuanRT/YouTube.js/blob/4 > **MWEB**: `"MWEB"` -Defined in: [src/core/Session.ts:24](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L24) +Defined in: [src/core/Session.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L24) *** @@ -66,7 +66,7 @@ Defined in: [src/core/Session.ts:24](https://github.com/LuanRT/YouTube.js/blob/4 > **TV**: `"TVHTML5"` -Defined in: [src/core/Session.ts:31](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L31) +Defined in: [src/core/Session.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L31) *** @@ -74,7 +74,7 @@ Defined in: [src/core/Session.ts:31](https://github.com/LuanRT/YouTube.js/blob/4 > **TV\_EMBEDDED**: `"TVHTML5_SIMPLY_EMBEDDED_PLAYER"` -Defined in: [src/core/Session.ts:33](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L33) +Defined in: [src/core/Session.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L33) *** @@ -82,7 +82,7 @@ Defined in: [src/core/Session.ts:33](https://github.com/LuanRT/YouTube.js/blob/4 > **TV\_SIMPLY**: `"TVHTML5_SIMPLY"` -Defined in: [src/core/Session.ts:32](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L32) +Defined in: [src/core/Session.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L32) *** @@ -90,7 +90,7 @@ Defined in: [src/core/Session.ts:32](https://github.com/LuanRT/YouTube.js/blob/4 > **WEB**: `"WEB"` -Defined in: [src/core/Session.ts:23](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L23) +Defined in: [src/core/Session.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L23) *** @@ -98,7 +98,7 @@ Defined in: [src/core/Session.ts:23](https://github.com/LuanRT/YouTube.js/blob/4 > **WEB\_CREATOR**: `"WEB_CREATOR"` -Defined in: [src/core/Session.ts:35](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L35) +Defined in: [src/core/Session.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L35) *** @@ -106,4 +106,4 @@ Defined in: [src/core/Session.ts:35](https://github.com/LuanRT/YouTube.js/blob/4 > **WEB\_EMBEDDED**: `"WEB_EMBEDDED_PLAYER"` -Defined in: [src/core/Session.ts:34](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L34) +Defined in: [src/core/Session.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L34) diff --git a/docs/api/interfaces/ApiResponse.md b/docs/api/interfaces/ApiResponse.md index dec7ff1a..4c0cd5c9 100644 --- a/docs/api/interfaces/ApiResponse.md +++ b/docs/api/interfaces/ApiResponse.md @@ -2,7 +2,7 @@ # Interface: ApiResponse -Defined in: [src/core/Actions.ts:18](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L18) +Defined in: [src/core/Actions.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L18) ## Properties @@ -10,7 +10,7 @@ Defined in: [src/core/Actions.ts:18](https://github.com/LuanRT/YouTube.js/blob/4 > **data**: [`IRawResponse`](IRawResponse.md) -Defined in: [src/core/Actions.ts:21](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L21) +Defined in: [src/core/Actions.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L21) *** @@ -18,7 +18,7 @@ Defined in: [src/core/Actions.ts:21](https://github.com/LuanRT/YouTube.js/blob/4 > **status\_code**: `number` -Defined in: [src/core/Actions.ts:20](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L20) +Defined in: [src/core/Actions.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L20) *** @@ -26,4 +26,4 @@ Defined in: [src/core/Actions.ts:20](https://github.com/LuanRT/YouTube.js/blob/4 > **success**: `boolean` -Defined in: [src/core/Actions.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L19) +Defined in: [src/core/Actions.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L19) diff --git a/docs/api/interfaces/HTTPClientInit.md b/docs/api/interfaces/HTTPClientInit.md index 8c7e21c8..625d26cb 100644 --- a/docs/api/interfaces/HTTPClientInit.md +++ b/docs/api/interfaces/HTTPClientInit.md @@ -2,7 +2,7 @@ # Interface: HTTPClientInit -Defined in: [src/utils/HTTPClient.ts:13](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/HTTPClient.ts#L13) +Defined in: [src/utils/HTTPClient.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/HTTPClient.ts#L13) ## Properties @@ -10,4 +10,4 @@ Defined in: [src/utils/HTTPClient.ts:13](https://github.com/LuanRT/YouTube.js/bl > `optional` **baseURL**: `string` -Defined in: [src/utils/HTTPClient.ts:14](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/HTTPClient.ts#L14) +Defined in: [src/utils/HTTPClient.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/HTTPClient.ts#L14) diff --git a/docs/api/interfaces/IBotguardChallenge.md b/docs/api/interfaces/IBotguardChallenge.md new file mode 100644 index 00000000..b0119a45 --- /dev/null +++ b/docs/api/interfaces/IBotguardChallenge.md @@ -0,0 +1,45 @@ +[youtubei.js](../README.md) / IBotguardChallenge + +# Interface: IBotguardChallenge + +Defined in: [src/parser/types/ParsedResponse.ts:91](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L91) + +## Properties + +### client\_experiments\_state\_blob + +> **client\_experiments\_state\_blob**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:96](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L96) + +*** + +### global\_name + +> **global\_name**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:95](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L95) + +*** + +### interpreter\_hash + +> **interpreter\_hash**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:93](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L93) + +*** + +### interpreter\_url + +> **interpreter\_url**: [`ITrustedResource`](ITrustedResource.md) + +Defined in: [src/parser/types/ParsedResponse.ts:92](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L92) + +*** + +### program + +> **program**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L94) diff --git a/docs/api/interfaces/IEndpoint.md b/docs/api/interfaces/IEndpoint.md new file mode 100644 index 00000000..c7c4d7f8 --- /dev/null +++ b/docs/api/interfaces/IEndpoint.md @@ -0,0 +1,35 @@ +[youtubei.js](../README.md) / IEndpoint + +# Interface: IEndpoint\ + +Defined in: [src/parser/types/CommandEndpoints.ts:1](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L1) + +## Type Parameters + +### T + +`T` = `any` + +## Methods + +### buildRequest() + +> **buildRequest**(): `T` + +Defined in: [src/parser/types/CommandEndpoints.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L3) + +#### Returns + +`T` + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:2](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L2) + +#### Returns + +`string` diff --git a/docs/api/interfaces/IParsedResponse.md b/docs/api/interfaces/IParsedResponse.md new file mode 100644 index 00000000..d8e79b03 --- /dev/null +++ b/docs/api/interfaces/IParsedResponse.md @@ -0,0 +1,421 @@ +[youtubei.js](../README.md) / IParsedResponse + +# Interface: IParsedResponse + +Defined in: [src/parser/types/ParsedResponse.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L25) + +## Properties + +### actions? + +> `optional` **actions**: [`SuperParsedResult`](../youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L29) + +*** + +### actions\_memo? + +> `optional` **actions\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L30) + +*** + +### alerts? + +> `optional` **alerts**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`Alert`](../youtubei.js/namespaces/YTNodes/classes/Alert.md) \| [`AlertWithButton`](../youtubei.js/namespaces/YTNodes/classes/AlertWithButton.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:53](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L53) + +*** + +### annotations? + +> `optional` **annotations**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`PlayerAnnotationsExpanded`](../youtubei.js/namespaces/YTNodes/classes/PlayerAnnotationsExpanded.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:65](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L65) + +*** + +### background? + +> `optional` **background**: [`MusicThumbnail`](../youtubei.js/namespaces/YTNodes/classes/MusicThumbnail.md) + +Defined in: [src/parser/types/ParsedResponse.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L26) + +*** + +### bg\_challenge? + +> `optional` **bg\_challenge**: [`IBotguardChallenge`](IBotguardChallenge.md) + +Defined in: [src/parser/types/ParsedResponse.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L28) + +*** + +### captions? + +> `optional` **captions**: [`PlayerCaptionsTracklist`](../youtubei.js/namespaces/YTNodes/classes/PlayerCaptionsTracklist.md) + +Defined in: [src/parser/types/ParsedResponse.ts:63](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L63) + +*** + +### cards? + +> `optional` **cards**: [`CardCollection`](../youtubei.js/namespaces/YTNodes/classes/CardCollection.md) + +Defined in: [src/parser/types/ParsedResponse.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L68) + +*** + +### challenge? + +> `optional` **challenge**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L27) + +*** + +### contents? + +> `optional` **contents**: [`SuperParsedResult`](../youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L31) + +*** + +### contents\_memo? + +> `optional` **contents\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L32) + +*** + +### continuation? + +> `optional` **continuation**: [`Continuation`](../classes/Continuation.md) + +Defined in: [src/parser/types/ParsedResponse.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L46) + +*** + +### continuation\_contents? + +> `optional` **continuation\_contents**: [`ItemSectionContinuation`](../classes/ItemSectionContinuation.md) \| [`SectionListContinuation`](../classes/SectionListContinuation.md) \| [`LiveChatContinuation`](../classes/LiveChatContinuation.md) \| [`MusicPlaylistShelfContinuation`](../classes/MusicPlaylistShelfContinuation.md) \| [`MusicShelfContinuation`](../classes/MusicShelfContinuation.md) \| [`GridContinuation`](../classes/GridContinuation.md) \| [`PlaylistPanelContinuation`](../classes/PlaylistPanelContinuation.md) \| [`ContinuationCommand`](../classes/ContinuationCommand.md) + +Defined in: [src/parser/types/ParsedResponse.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L47) + +*** + +### continuation\_contents\_memo? + +> `optional` **continuation\_contents\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L49) + +*** + +### continuation\_endpoint? + +> `optional` **continuation\_endpoint**: [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md) + +Defined in: [src/parser/types/ParsedResponse.ts:81](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L81) + +*** + +### cpn\_info? + +> `optional` **cpn\_info**: `object` + +Defined in: [src/parser/types/ParsedResponse.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L69) + +#### cpn? + +> `optional` **cpn**: `string` + +#### cpn\_source? + +> `optional` **cpn\_source**: `"CPN_SOURCE_TYPE_UNKNOWN"` \| `"CPN_SOURCE_TYPE_CLIENT"` \| `"CPN_SOURCE_TYPE_WATCH_SERVER"` + +*** + +### current\_video\_endpoint? + +> `optional` **current\_video\_endpoint**: [`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/types/ParsedResponse.ts:61](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L61) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/types/ParsedResponse.ts:62](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L62) + +*** + +### endscreen? + +> `optional` **endscreen**: [`Endscreen`](../youtubei.js/namespaces/YTNodes/classes/Endscreen.md) + +Defined in: [src/parser/types/ParsedResponse.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L67) + +*** + +### engagement\_panels? + +> `optional` **engagement\_panels**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`EngagementPanelSectionList`](../youtubei.js/namespaces/YTNodes/classes/EngagementPanelSectionList.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:76](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L76) + +*** + +### entries? + +> `optional` **entries**: [`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md)[] + +Defined in: [src/parser/types/ParsedResponse.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L78) + +*** + +### entries\_memo? + +> `optional` **entries\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:79](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L79) + +*** + +### estimated\_results? + +> `optional` **estimated\_results**: `number` + +Defined in: [src/parser/types/ParsedResponse.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L55) + +*** + +### header? + +> `optional` **header**: [`SuperParsedResult`](../youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L33) + +*** + +### header\_memo? + +> `optional` **header\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L34) + +*** + +### items? + +> `optional` **items**: [`SuperParsedResult`](../youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:77](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L77) + +*** + +### items\_memo? + +> `optional` **items\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L39) + +*** + +### live\_chat\_item\_context\_menu\_supported\_renderers? + +> `optional` **live\_chat\_item\_context\_menu\_supported\_renderers**: [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md) + +Defined in: [src/parser/types/ParsedResponse.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L37) + +*** + +### live\_chat\_item\_context\_menu\_supported\_renderers\_memo? + +> `optional` **live\_chat\_item\_context\_menu\_supported\_renderers\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L38) + +*** + +### metadata? + +> `optional` **metadata**: [`SuperParsedResult`](../youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L50) + +*** + +### microformat? + +> `optional` **microformat**: [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md) + +Defined in: [src/parser/types/ParsedResponse.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L51) + +*** + +### on\_response\_received\_actions? + +> `optional` **on\_response\_received\_actions**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`OpenPopupAction`](../youtubei.js/namespaces/YTNodes/classes/OpenPopupAction.md) \| [`AppendContinuationItemsAction`](../classes/AppendContinuationItemsAction.md) \| [`ReloadContinuationItemsCommand`](../classes/ReloadContinuationItemsCommand.md) \| [`NavigateAction`](../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../classes/ShowMiniplayerCommand.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L40) + +*** + +### on\_response\_received\_actions\_memo? + +> `optional` **on\_response\_received\_actions\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L41) + +*** + +### on\_response\_received\_commands? + +> `optional` **on\_response\_received\_commands**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`OpenPopupAction`](../youtubei.js/namespaces/YTNodes/classes/OpenPopupAction.md) \| [`AppendContinuationItemsAction`](../classes/AppendContinuationItemsAction.md) \| [`ReloadContinuationItemsCommand`](../classes/ReloadContinuationItemsCommand.md) \| [`NavigateAction`](../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../classes/ShowMiniplayerCommand.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L44) + +*** + +### on\_response\_received\_commands\_memo? + +> `optional` **on\_response\_received\_commands\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L45) + +*** + +### on\_response\_received\_endpoints? + +> `optional` **on\_response\_received\_endpoints**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`OpenPopupAction`](../youtubei.js/namespaces/YTNodes/classes/OpenPopupAction.md) \| [`AppendContinuationItemsAction`](../classes/AppendContinuationItemsAction.md) \| [`ReloadContinuationItemsCommand`](../classes/ReloadContinuationItemsCommand.md) \| [`NavigateAction`](../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../classes/ShowMiniplayerCommand.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L42) + +*** + +### on\_response\_received\_endpoints\_memo? + +> `optional` **on\_response\_received\_endpoints\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L43) + +*** + +### overlay? + +> `optional` **overlay**: [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md) + +Defined in: [src/parser/types/ParsedResponse.ts:52](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L52) + +*** + +### playability\_status? + +> `optional` **playability\_status**: [`IPlayabilityStatus`](IPlayabilityStatus.md) + +Defined in: [src/parser/types/ParsedResponse.ts:58](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L58) + +*** + +### playback\_tracking? + +> `optional` **playback\_tracking**: [`IPlaybackTracking`](IPlaybackTracking.md) + +Defined in: [src/parser/types/ParsedResponse.ts:57](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L57) + +*** + +### player\_config? + +> `optional` **player\_config**: [`IPlayerConfig`](IPlayerConfig.md) + +Defined in: [src/parser/types/ParsedResponse.ts:60](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L60) + +*** + +### player\_overlays? + +> `optional` **player\_overlays**: [`SuperParsedResult`](../youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/types/ParsedResponse.ts:56](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L56) + +*** + +### player\_response? + +> `optional` **player\_response**: [`IPlayerResponse`](../type-aliases/IPlayerResponse.md) + +Defined in: [src/parser/types/ParsedResponse.ts:82](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L82) + +*** + +### refinements? + +> `optional` **refinements**: `string`[] + +Defined in: [src/parser/types/ParsedResponse.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L54) + +*** + +### sidebar? + +> `optional` **sidebar**: [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md) + +Defined in: [src/parser/types/ParsedResponse.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L35) + +*** + +### sidebar\_memo? + +> `optional` **sidebar\_memo**: [`Memo`](../youtubei.js/namespaces/Helpers/classes/Memo.md) + +Defined in: [src/parser/types/ParsedResponse.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L36) + +*** + +### storyboards? + +> `optional` **storyboards**: [`PlayerStoryboardSpec`](../youtubei.js/namespaces/YTNodes/classes/PlayerStoryboardSpec.md) \| [`PlayerLiveStoryboardSpec`](../youtubei.js/namespaces/YTNodes/classes/PlayerLiveStoryboardSpec.md) + +Defined in: [src/parser/types/ParsedResponse.ts:66](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L66) + +*** + +### streaming\_data? + +> `optional` **streaming\_data**: [`IStreamingData`](IStreamingData.md) + +Defined in: [src/parser/types/ParsedResponse.ts:59](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L59) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:80](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L80) + +*** + +### video\_details? + +> `optional` **video\_details**: [`VideoDetails`](../youtubei.js/namespaces/Misc/classes/VideoDetails.md) + +Defined in: [src/parser/types/ParsedResponse.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L64) + +*** + +### watch\_next\_response? + +> `optional` **watch\_next\_response**: [`INextResponse`](../type-aliases/INextResponse.md) + +Defined in: [src/parser/types/ParsedResponse.ts:83](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L83) diff --git a/docs/api/interfaces/IPlayabilityStatus.md b/docs/api/interfaces/IPlayabilityStatus.md new file mode 100644 index 00000000..d0af7e31 --- /dev/null +++ b/docs/api/interfaces/IPlayabilityStatus.md @@ -0,0 +1,45 @@ +[youtubei.js](../README.md) / IPlayabilityStatus + +# Interface: IPlayabilityStatus + +Defined in: [src/parser/types/ParsedResponse.ts:103](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L103) + +## Properties + +### audio\_only\_playability + +> **audio\_only\_playability**: [`AudioOnlyPlayability`](../youtubei.js/namespaces/YTNodes/classes/AudioOnlyPlayability.md) \| `null` + +Defined in: [src/parser/types/ParsedResponse.ts:106](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L106) + +*** + +### embeddable + +> **embeddable**: `boolean` + +Defined in: [src/parser/types/ParsedResponse.ts:107](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L107) + +*** + +### error\_screen + +> **error\_screen**: [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/types/ParsedResponse.ts:105](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L105) + +*** + +### reason + +> **reason**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:108](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L108) + +*** + +### status + +> **status**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L104) diff --git a/docs/api/interfaces/IPlaybackTracking.md b/docs/api/interfaces/IPlaybackTracking.md new file mode 100644 index 00000000..fdecf3b7 --- /dev/null +++ b/docs/api/interfaces/IPlaybackTracking.md @@ -0,0 +1,21 @@ +[youtubei.js](../README.md) / IPlaybackTracking + +# Interface: IPlaybackTracking + +Defined in: [src/parser/types/ParsedResponse.ts:99](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L99) + +## Properties + +### videostats\_playback\_url + +> **videostats\_playback\_url**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:101](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L101) + +*** + +### videostats\_watchtime\_url + +> **videostats\_watchtime\_url**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:100](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L100) diff --git a/docs/api/interfaces/IPlayerConfig.md b/docs/api/interfaces/IPlayerConfig.md new file mode 100644 index 00000000..1b387d5e --- /dev/null +++ b/docs/api/interfaces/IPlayerConfig.md @@ -0,0 +1,69 @@ +[youtubei.js](../README.md) / IPlayerConfig + +# Interface: IPlayerConfig + +Defined in: [src/parser/types/ParsedResponse.ts:111](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L111) + +## Properties + +### audio\_config + +> **audio\_config**: `object` + +Defined in: [src/parser/types/ParsedResponse.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L112) + +#### enable\_per\_format\_loudness + +> **enable\_per\_format\_loudness**: `boolean` + +#### loudness\_db? + +> `optional` **loudness\_db**: `number` + +#### perceptual\_loudness\_db? + +> `optional` **perceptual\_loudness\_db**: `number` + +*** + +### media\_common\_config + +> **media\_common\_config**: `object` + +Defined in: [src/parser/types/ParsedResponse.ts:120](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L120) + +#### dynamic\_readahead\_config + +> **dynamic\_readahead\_config**: `object` + +##### dynamic\_readahead\_config.max\_read\_ahead\_media\_time\_ms + +> **max\_read\_ahead\_media\_time\_ms**: `number` + +##### dynamic\_readahead\_config.min\_read\_ahead\_media\_time\_ms + +> **min\_read\_ahead\_media\_time\_ms**: `number` + +##### dynamic\_readahead\_config.read\_ahead\_growth\_rate\_ms + +> **read\_ahead\_growth\_rate\_ms**: `number` + +#### media\_ustreamer\_request\_config? + +> `optional` **media\_ustreamer\_request\_config**: `object` + +##### media\_ustreamer\_request\_config.video\_playback\_ustreamer\_config? + +> `optional` **video\_playback\_ustreamer\_config**: `string` + +*** + +### stream\_selection\_config + +> **stream\_selection\_config**: `object` + +Defined in: [src/parser/types/ParsedResponse.ts:117](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L117) + +#### max\_bitrate + +> **max\_bitrate**: `string` diff --git a/docs/api/interfaces/IRawBotguardChallenge.md b/docs/api/interfaces/IRawBotguardChallenge.md new file mode 100644 index 00000000..02a3b966 --- /dev/null +++ b/docs/api/interfaces/IRawBotguardChallenge.md @@ -0,0 +1,45 @@ +[youtubei.js](../README.md) / IRawBotguardChallenge + +# Interface: IRawBotguardChallenge + +Defined in: [src/parser/types/RawResponse.ts:1572](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1572) + +## Properties + +### clientExperimentsStateBlob + +> **clientExperimentsStateBlob**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1577](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1577) + +*** + +### globalName + +> **globalName**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1576](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1576) + +*** + +### interpreterHash + +> **interpreterHash**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1574](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1574) + +*** + +### interpreterUrl + +> **interpreterUrl**: [`IRawTrustedResource`](IRawTrustedResource.md) + +Defined in: [src/parser/types/RawResponse.ts:1573](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1573) + +*** + +### program + +> **program**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1575](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1575) diff --git a/docs/api/interfaces/IRawPlayerConfig.md b/docs/api/interfaces/IRawPlayerConfig.md new file mode 100644 index 00000000..aae7a89b --- /dev/null +++ b/docs/api/interfaces/IRawPlayerConfig.md @@ -0,0 +1,69 @@ +[youtubei.js](../README.md) / IRawPlayerConfig + +# Interface: IRawPlayerConfig + +Defined in: [src/parser/types/RawResponse.ts:1546](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1546) + +## Properties + +### audioConfig + +> **audioConfig**: `object` + +Defined in: [src/parser/types/RawResponse.ts:1547](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1547) + +#### enablePerFormatLoudness + +> **enablePerFormatLoudness**: `boolean` + +#### loudnessDb? + +> `optional` **loudnessDb**: `number` + +#### perceptualLoudnessDb? + +> `optional` **perceptualLoudnessDb**: `number` + +*** + +### mediaCommonConfig + +> **mediaCommonConfig**: `object` + +Defined in: [src/parser/types/RawResponse.ts:1555](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1555) + +#### dynamicReadaheadConfig? + +> `optional` **dynamicReadaheadConfig**: `object` + +##### dynamicReadaheadConfig.maxReadAheadMediaTimeMs + +> **maxReadAheadMediaTimeMs**: `number` + +##### dynamicReadaheadConfig.minReadAheadMediaTimeMs + +> **minReadAheadMediaTimeMs**: `number` + +##### dynamicReadaheadConfig.readAheadGrowthRateMs + +> **readAheadGrowthRateMs**: `number` + +#### mediaUstreamerRequestConfig? + +> `optional` **mediaUstreamerRequestConfig**: `object` + +##### mediaUstreamerRequestConfig.videoPlaybackUstreamerConfig + +> **videoPlaybackUstreamerConfig**: `string` + +*** + +### streamSelectionConfig + +> **streamSelectionConfig**: `object` + +Defined in: [src/parser/types/RawResponse.ts:1552](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1552) + +#### maxBitrate + +> **maxBitrate**: `string` diff --git a/docs/api/interfaces/IRawResponse.md b/docs/api/interfaces/IRawResponse.md new file mode 100644 index 00000000..745cac50 --- /dev/null +++ b/docs/api/interfaces/IRawResponse.md @@ -0,0 +1,413 @@ +[youtubei.js](../README.md) / IRawResponse + +# Interface: IRawResponse + +Defined in: [src/parser/types/RawResponse.ts:1580](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1580) + +## Indexable + +\[`key`: `string`\]: `any` + +## Properties + +### actions? + +> `optional` **actions**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1590](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1590) + +*** + +### alerts? + +> `optional` **alerts**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1598](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1598) + +*** + +### annotations? + +> `optional` **annotations**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1634](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1634) + +*** + +### background? + +> `optional` **background**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1582](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1582) + +*** + +### bgChallenge? + +> `optional` **bgChallenge**: [`IRawBotguardChallenge`](IRawBotguardChallenge.md) + +Defined in: [src/parser/types/RawResponse.ts:1583](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1583) + +*** + +### captions? + +> `optional` **captions**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1632](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1632) + +*** + +### cards? + +> `optional` **cards**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1637](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1637) + +*** + +### challenge? + +> `optional` **challenge**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1584](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1584) + +*** + +### contents? + +> `optional` **contents**: [`RawData`](../type-aliases/RawData.md) + +Defined in: [src/parser/types/RawResponse.ts:1585](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1585) + +*** + +### continuation? + +> `optional` **continuation**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1594](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1594) + +*** + +### continuationContents? + +> `optional` **continuationContents**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1589](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1589) + +*** + +### cpnInfo? + +> `optional` **cpnInfo**: `IYoutubeApiInnertubeCpnInfo` + +Defined in: [src/parser/types/RawResponse.ts:1638](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1638) + +*** + +### currentVideoEndpoint? + +> `optional` **currentVideoEndpoint**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1628](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1628) + +*** + +### endpoint? + +> `optional` **endpoint**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1631](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1631) + +*** + +### endscreen? + +> `optional` **endscreen**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1636](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1636) + +*** + +### engagementPanels? + +> `optional` **engagementPanels**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1642](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1642) + +*** + +### entries? + +> `optional` **entries**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1643](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1643) + +*** + +### estimatedResults? + +> `optional` **estimatedResults**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1600](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1600) + +*** + +### frameworkUpdates? + +> `optional` **frameworkUpdates**: `any` + +Defined in: [src/parser/types/RawResponse.ts:1641](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1641) + +*** + +### header? + +> `optional` **header**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1592](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1592) + +*** + +### items? + +> `optional` **items**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1640](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1640) + +*** + +### liveChatItemContextMenuSupportedRenderers? + +> `optional` **liveChatItemContextMenuSupportedRenderers**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1591](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1591) + +*** + +### metadata? + +> `optional` **metadata**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1595](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1595) + +*** + +### microformat? + +> `optional` **microformat**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1596](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1596) + +*** + +### onResponseReceivedActions? + +> `optional` **onResponseReceivedActions**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1586](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1586) + +*** + +### onResponseReceivedCommands? + +> `optional` **onResponseReceivedCommands**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1588](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1588) + +*** + +### onResponseReceivedEndpoints? + +> `optional` **onResponseReceivedEndpoints**: [`RawNode`](../type-aliases/RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:1587](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1587) + +*** + +### overlay? + +> `optional` **overlay**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1597](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1597) + +*** + +### playabilityStatus? + +> `optional` **playabilityStatus**: `object` + +Defined in: [src/parser/types/RawResponse.ts:1610](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1610) + +#### audioOnlyPlayability? + +> `optional` **audioOnlyPlayability**: [`RawNode`](../type-aliases/RawNode.md) + +#### errorScreen? + +> `optional` **errorScreen**: [`RawNode`](../type-aliases/RawNode.md) + +#### playableInEmbed? + +> `optional` **playableInEmbed**: `boolean` + +#### reason? + +> `optional` **reason**: `string` + +#### status + +> **status**: `string` + +*** + +### playbackTracking? + +> `optional` **playbackTracking**: `object` + +Defined in: [src/parser/types/RawResponse.ts:1602](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1602) + +#### videostatsPlaybackUrl + +> **videostatsPlaybackUrl**: `object` + +##### videostatsPlaybackUrl.baseUrl + +> **baseUrl**: `string` + +#### videostatsWatchtimeUrl + +> **videostatsWatchtimeUrl**: `object` + +##### videostatsWatchtimeUrl.baseUrl + +> **baseUrl**: `string` + +*** + +### playerConfig? + +> `optional` **playerConfig**: [`IRawPlayerConfig`](IRawPlayerConfig.md) + +Defined in: [src/parser/types/RawResponse.ts:1625](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1625) + +*** + +### playerOverlays? + +> `optional` **playerOverlays**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1601](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1601) + +*** + +### playerResponse? + +> `optional` **playerResponse**: `IRawResponse` + +Defined in: [src/parser/types/RawResponse.ts:1626](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1626) + +*** + +### playlistId? + +> `optional` **playlistId**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1630](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1630) + +*** + +### refinements? + +> `optional` **refinements**: `string`[] + +Defined in: [src/parser/types/RawResponse.ts:1599](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1599) + +*** + +### responseContext? + +> `optional` **responseContext**: `IYoutubeApiInnertubeResponseContext` + +Defined in: [src/parser/types/RawResponse.ts:1581](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1581) + +*** + +### sidebar? + +> `optional` **sidebar**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1593](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1593) + +*** + +### storyboards? + +> `optional` **storyboards**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1635](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1635) + +*** + +### streamingData? + +> `optional` **streamingData**: `object` + +Defined in: [src/parser/types/RawResponse.ts:1617](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1617) + +#### adaptiveFormats + +> **adaptiveFormats**: [`RawNode`](../type-aliases/RawNode.md)[] + +#### dashManifestUrl? + +> `optional` **dashManifestUrl**: `string` + +#### expiresInSeconds + +> **expiresInSeconds**: `string` + +#### formats + +> **formats**: [`RawNode`](../type-aliases/RawNode.md)[] + +#### hlsManifestUrl? + +> `optional` **hlsManifestUrl**: `string` + +#### serverAbrStreamingUrl? + +> `optional` **serverAbrStreamingUrl**: `string` + +*** + +### targetId? + +> `optional` **targetId**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1639](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1639) + +*** + +### unseenCount? + +> `optional` **unseenCount**: `number` + +Defined in: [src/parser/types/RawResponse.ts:1629](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1629) + +*** + +### videoDetails? + +> `optional` **videoDetails**: [`RawNode`](../type-aliases/RawNode.md) + +Defined in: [src/parser/types/RawResponse.ts:1633](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1633) + +*** + +### watchNextResponse? + +> `optional` **watchNextResponse**: `IRawResponse` + +Defined in: [src/parser/types/RawResponse.ts:1627](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1627) diff --git a/docs/api/interfaces/IRawTrustedResource.md b/docs/api/interfaces/IRawTrustedResource.md new file mode 100644 index 00000000..e0f1b78e --- /dev/null +++ b/docs/api/interfaces/IRawTrustedResource.md @@ -0,0 +1,21 @@ +[youtubei.js](../README.md) / IRawTrustedResource + +# Interface: IRawTrustedResource + +Defined in: [src/parser/types/RawResponse.ts:1567](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1567) + +## Properties + +### privateDoNotAccessOrElseSafeScriptWrappedValue? + +> `optional` **privateDoNotAccessOrElseSafeScriptWrappedValue**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1569](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1569) + +*** + +### privateDoNotAccessOrElseTrustedResourceUrlWrappedValue? + +> `optional` **privateDoNotAccessOrElseTrustedResourceUrlWrappedValue**: `string` + +Defined in: [src/parser/types/RawResponse.ts:1568](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1568) diff --git a/docs/api/interfaces/IStreamingData.md b/docs/api/interfaces/IStreamingData.md new file mode 100644 index 00000000..e3213206 --- /dev/null +++ b/docs/api/interfaces/IStreamingData.md @@ -0,0 +1,53 @@ +[youtubei.js](../README.md) / IStreamingData + +# Interface: IStreamingData + +Defined in: [src/parser/types/ParsedResponse.ts:132](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L132) + +## Properties + +### adaptive\_formats + +> **adaptive\_formats**: [`Format`](../youtubei.js/namespaces/Misc/classes/Format.md)[] + +Defined in: [src/parser/types/ParsedResponse.ts:135](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L135) + +*** + +### dash\_manifest\_url? + +> `optional` **dash\_manifest\_url**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:136](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L136) + +*** + +### expires + +> **expires**: `Date` + +Defined in: [src/parser/types/ParsedResponse.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L133) + +*** + +### formats + +> **formats**: [`Format`](../youtubei.js/namespaces/Misc/classes/Format.md)[] + +Defined in: [src/parser/types/ParsedResponse.ts:134](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L134) + +*** + +### hls\_manifest\_url? + +> `optional` **hls\_manifest\_url**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L137) + +*** + +### server\_abr\_streaming\_url? + +> `optional` **server\_abr\_streaming\_url**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:138](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L138) diff --git a/docs/api/interfaces/ITrustedResource.md b/docs/api/interfaces/ITrustedResource.md new file mode 100644 index 00000000..4518a6d2 --- /dev/null +++ b/docs/api/interfaces/ITrustedResource.md @@ -0,0 +1,21 @@ +[youtubei.js](../README.md) / ITrustedResource + +# Interface: ITrustedResource + +Defined in: [src/parser/types/ParsedResponse.ts:86](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L86) + +## Properties + +### private\_do\_not\_access\_or\_else\_safe\_script\_wrapped\_value? + +> `optional` **private\_do\_not\_access\_or\_else\_safe\_script\_wrapped\_value**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:88](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L88) + +*** + +### private\_do\_not\_access\_or\_else\_trusted\_resource\_url\_wrapped\_value? + +> `optional` **private\_do\_not\_access\_or\_else\_trusted\_resource\_url\_wrapped\_value**: `string` + +Defined in: [src/parser/types/ParsedResponse.ts:87](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L87) diff --git a/docs/api/type-aliases/AddToPlaylistServiceRequest.md b/docs/api/type-aliases/AddToPlaylistServiceRequest.md new file mode 100644 index 00000000..cae35802 --- /dev/null +++ b/docs/api/type-aliases/AddToPlaylistServiceRequest.md @@ -0,0 +1,39 @@ +[youtubei.js](../README.md) / AddToPlaylistServiceRequest + +# Type Alias: AddToPlaylistServiceRequest + +> **AddToPlaylistServiceRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L55) + +## Properties + +### excludeWatchLater? + +> `optional` **excludeWatchLater**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:59](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L59) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:58](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L58) + +*** + +### playlistId? + +> `optional` **playlistId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:57](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L57) + +*** + +### videoIds? + +> `optional` **videoIds**: `string`[] + +Defined in: [src/parser/types/CommandEndpoints.ts:56](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L56) diff --git a/docs/api/type-aliases/BrowseRequest.md b/docs/api/type-aliases/BrowseRequest.md new file mode 100644 index 00000000..b1e5a329 --- /dev/null +++ b/docs/api/type-aliases/BrowseRequest.md @@ -0,0 +1,63 @@ +[youtubei.js](../README.md) / BrowseRequest + +# Type Alias: BrowseRequest + +> **BrowseRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L6) + +## Properties + +### browseId? + +> `optional` **browseId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L7) + +*** + +### browseRequestSupportedMetadata? + +> `optional` **browseRequestSupportedMetadata**: [`BrowseRequestSupportedMetadata`](BrowseRequestSupportedMetadata.md) + +Defined in: [src/parser/types/CommandEndpoints.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L12) + +*** + +### formData? + +> `optional` **formData**: [`FormData`](FormData.md) + +Defined in: [src/parser/types/CommandEndpoints.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L10) + +*** + +### inlineSettingStatus? + +> `optional` **inlineSettingStatus**: [`InlineSettingStatus`](InlineSettingStatus.md) + +Defined in: [src/parser/types/CommandEndpoints.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L13) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L8) + +*** + +### query? + +> `optional` **query**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L9) + +*** + +### subscriptionSettingsState? + +> `optional` **subscriptionSettingsState**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L11) diff --git a/docs/api/type-aliases/BrowseRequestSupportedMetadata.md b/docs/api/type-aliases/BrowseRequestSupportedMetadata.md new file mode 100644 index 00000000..24dae617 --- /dev/null +++ b/docs/api/type-aliases/BrowseRequestSupportedMetadata.md @@ -0,0 +1,23 @@ +[youtubei.js](../README.md) / BrowseRequestSupportedMetadata + +# Type Alias: BrowseRequestSupportedMetadata + +> **BrowseRequestSupportedMetadata** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L25) + +## Properties + +### downloadsBrowseParams + +> **downloadsBrowseParams**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L26) + +#### offlineFeatureSettingState + +> **offlineFeatureSettingState**: `object` + +##### offlineFeatureSettingState.isSdEnabled + +> **isSdEnabled**: `boolean` diff --git a/docs/api/type-aliases/Context.md b/docs/api/type-aliases/Context.md index a9c7b3ea..56c8f816 100644 --- a/docs/api/type-aliases/Context.md +++ b/docs/api/type-aliases/Context.md @@ -4,7 +4,7 @@ > **Context** = `object` -Defined in: [src/core/Session.ts:38](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L38) +Defined in: [src/core/Session.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L38) ## Properties @@ -12,7 +12,7 @@ Defined in: [src/core/Session.ts:38](https://github.com/LuanRT/YouTube.js/blob/4 > **client**: `object` -Defined in: [src/core/Session.ts:39](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L39) +Defined in: [src/core/Session.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L39) #### androidSdkVersion? @@ -196,7 +196,7 @@ Defined in: [src/core/Session.ts:39](https://github.com/LuanRT/YouTube.js/blob/4 > `optional` **request**: `object` -Defined in: [src/core/Session.ts:98](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L98) +Defined in: [src/core/Session.ts:98](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L98) #### internalExperimentFlags @@ -212,7 +212,7 @@ Defined in: [src/core/Session.ts:98](https://github.com/LuanRT/YouTube.js/blob/4 > `optional` **thirdParty**: `object` -Defined in: [src/core/Session.ts:95](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L95) +Defined in: [src/core/Session.ts:95](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L95) #### embedUrl @@ -224,7 +224,7 @@ Defined in: [src/core/Session.ts:95](https://github.com/LuanRT/YouTube.js/blob/4 > **user**: `object` -Defined in: [src/core/Session.ts:90](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L90) +Defined in: [src/core/Session.ts:90](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L90) #### enableSafetyMode diff --git a/docs/api/type-aliases/ContinuationRequest.md b/docs/api/type-aliases/ContinuationRequest.md new file mode 100644 index 00000000..0747f90e --- /dev/null +++ b/docs/api/type-aliases/ContinuationRequest.md @@ -0,0 +1,43 @@ +[youtubei.js](../README.md) / ContinuationRequest + +# Type Alias: ContinuationRequest + +> **ContinuationRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:143](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L143) + +## Properties + +### continuation? + +> `optional` **continuation**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:145](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L145) + +*** + +### fetchCommentsParams? + +> `optional` **fetchCommentsParams**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:147](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L147) + +#### continuation + +> **continuation**: `string` + +*** + +### formData? + +> `optional` **formData**: [`FormData`](FormData.md) + +Defined in: [src/parser/types/CommandEndpoints.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L144) + +*** + +### notificationsMenuRequestType? + +> `optional` **notificationsMenuRequestType**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:146](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L146) diff --git a/docs/api/type-aliases/CreateCommentRequest.md b/docs/api/type-aliases/CreateCommentRequest.md new file mode 100644 index 00000000..d48255a3 --- /dev/null +++ b/docs/api/type-aliases/CreateCommentRequest.md @@ -0,0 +1,91 @@ +[youtubei.js](../README.md) / CreateCommentRequest + +# Type Alias: CreateCommentRequest + +> **CreateCommentRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:179](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L179) + +## Properties + +### accessRestrictions? + +> `optional` **accessRestrictions**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:186](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L186) + +#### restriction + +> **restriction**: `"RESTRICTION_TYPE_EVERYONE"` \| `"RESTRICTION_TYPE_SPONSORS_ONLY"` + +*** + +### botguardResponse? + +> `optional` **botguardResponse**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:187](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L187) + +*** + +### commentText? + +> `optional` **commentText**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L181) + +*** + +### createCommentParams? + +> `optional` **createCommentParams**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:180](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L180) + +*** + +### imageAttachment? + +> `optional` **imageAttachment**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:184](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L184) + +#### encryptedBlobId + +> **encryptedBlobId**: `string` + +*** + +### pollAttachment? + +> `optional` **pollAttachment**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:183](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L183) + +#### choices + +> **choices**: `string`[] + +*** + +### sharedPostAttachment? + +> `optional` **sharedPostAttachment**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:185](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L185) + +#### postId + +> **postId**: `string` + +*** + +### videoAttachment? + +> `optional` **videoAttachment**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:182](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L182) + +#### videoId + +> **videoId**: `string` diff --git a/docs/api/type-aliases/CreatePlaylistServiceRequest.md b/docs/api/type-aliases/CreatePlaylistServiceRequest.md new file mode 100644 index 00000000..6814748c --- /dev/null +++ b/docs/api/type-aliases/CreatePlaylistServiceRequest.md @@ -0,0 +1,55 @@ +[youtubei.js](../README.md) / CreatePlaylistServiceRequest + +# Type Alias: CreatePlaylistServiceRequest + +> **CreatePlaylistServiceRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L104) + +## Properties + +### description? + +> `optional` **description**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:107](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L107) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:109](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L109) + +*** + +### privacyStatus? + +> `optional` **privacyStatus**: [`PlaylistPrivacyStatus`](PlaylistPrivacyStatus.md) + +Defined in: [src/parser/types/CommandEndpoints.ts:106](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L106) + +*** + +### sourcePlaylistId? + +> `optional` **sourcePlaylistId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:110](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L110) + +*** + +### title? + +> `optional` **title**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:105](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L105) + +*** + +### videoIds? + +> `optional` **videoIds**: `string`[] + +Defined in: [src/parser/types/CommandEndpoints.ts:108](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L108) diff --git a/docs/api/type-aliases/DeletePlaylistServiceRequest.md b/docs/api/type-aliases/DeletePlaylistServiceRequest.md new file mode 100644 index 00000000..c1090598 --- /dev/null +++ b/docs/api/type-aliases/DeletePlaylistServiceRequest.md @@ -0,0 +1,15 @@ +[youtubei.js](../README.md) / DeletePlaylistServiceRequest + +# Type Alias: DeletePlaylistServiceRequest + +> **DeletePlaylistServiceRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:113](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L113) + +## Properties + +### playlistId? + +> `optional` **playlistId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:114](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L114) diff --git a/docs/api/type-aliases/DeviceAndUserCode.md b/docs/api/type-aliases/DeviceAndUserCode.md index 494b9b32..d54cd40c 100644 --- a/docs/api/type-aliases/DeviceAndUserCode.md +++ b/docs/api/type-aliases/DeviceAndUserCode.md @@ -4,7 +4,7 @@ > **DeviceAndUserCode** = `object` -Defined in: [src/core/OAuth2.ts:22](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L22) +Defined in: [src/core/OAuth2.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L22) ## Properties @@ -12,7 +12,7 @@ Defined in: [src/core/OAuth2.ts:22](https://github.com/LuanRT/YouTube.js/blob/41 > **device\_code**: `string` -Defined in: [src/core/OAuth2.ts:23](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L23) +Defined in: [src/core/OAuth2.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L23) *** @@ -20,7 +20,7 @@ Defined in: [src/core/OAuth2.ts:23](https://github.com/LuanRT/YouTube.js/blob/41 > `optional` **error\_code**: `string` -Defined in: [src/core/OAuth2.ts:28](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L28) +Defined in: [src/core/OAuth2.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L28) *** @@ -28,7 +28,7 @@ Defined in: [src/core/OAuth2.ts:28](https://github.com/LuanRT/YouTube.js/blob/41 > **expires\_in**: `number` -Defined in: [src/core/OAuth2.ts:24](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L24) +Defined in: [src/core/OAuth2.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L24) *** @@ -36,7 +36,7 @@ Defined in: [src/core/OAuth2.ts:24](https://github.com/LuanRT/YouTube.js/blob/41 > **interval**: `number` -Defined in: [src/core/OAuth2.ts:25](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L25) +Defined in: [src/core/OAuth2.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L25) *** @@ -44,7 +44,7 @@ Defined in: [src/core/OAuth2.ts:25](https://github.com/LuanRT/YouTube.js/blob/41 > **user\_code**: `string` -Defined in: [src/core/OAuth2.ts:26](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L26) +Defined in: [src/core/OAuth2.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L26) *** @@ -52,4 +52,4 @@ Defined in: [src/core/OAuth2.ts:26](https://github.com/LuanRT/YouTube.js/blob/41 > **verification\_url**: `string` -Defined in: [src/core/OAuth2.ts:27](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L27) +Defined in: [src/core/OAuth2.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L27) diff --git a/docs/api/type-aliases/FeedbackContext.md b/docs/api/type-aliases/FeedbackContext.md new file mode 100644 index 00000000..b4bd0fb2 --- /dev/null +++ b/docs/api/type-aliases/FeedbackContext.md @@ -0,0 +1,15 @@ +[youtubei.js](../README.md) / FeedbackContext + +# Type Alias: FeedbackContext + +> **FeedbackContext** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L35) + +## Properties + +### cpn + +> **cpn**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L36) diff --git a/docs/api/type-aliases/FeedbackRequest.md b/docs/api/type-aliases/FeedbackRequest.md new file mode 100644 index 00000000..1e3030a8 --- /dev/null +++ b/docs/api/type-aliases/FeedbackRequest.md @@ -0,0 +1,39 @@ +[youtubei.js](../README.md) / FeedbackRequest + +# Type Alias: FeedbackRequest + +> **FeedbackRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L39) + +## Properties + +### feedbackContext? + +> `optional` **feedbackContext**: [`FeedbackContext`](FeedbackContext.md) + +Defined in: [src/parser/types/CommandEndpoints.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L41) + +*** + +### feedbackTokens? + +> `optional` **feedbackTokens**: `string`[] + +Defined in: [src/parser/types/CommandEndpoints.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L40) + +*** + +### isFeedbackTokenUnencrypted? + +> `optional` **isFeedbackTokenUnencrypted**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L42) + +*** + +### shouldMerge? + +> `optional` **shouldMerge**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L43) diff --git a/docs/api/type-aliases/FormData.md b/docs/api/type-aliases/FormData.md new file mode 100644 index 00000000..79e4c1f9 --- /dev/null +++ b/docs/api/type-aliases/FormData.md @@ -0,0 +1,31 @@ +[youtubei.js](../README.md) / FormData + +# Type Alias: FormData + +> **FormData** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L16) + +## Properties + +### accountSettingsFormData + +> **accountSettingsFormData**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L17) + +#### flagAudioDescriptionDefaultOn + +> **flagAudioDescriptionDefaultOn**: `boolean` + +#### flagAutoCaptionsDefaultOn + +> **flagAutoCaptionsDefaultOn**: `boolean` + +#### flagCaptionsDefaultOff + +> **flagCaptionsDefaultOff**: `boolean` + +#### flagDisableInlinePreview + +> **flagDisableInlinePreview**: `boolean` diff --git a/docs/api/type-aliases/GetAccountsListInnertubeRequest.md b/docs/api/type-aliases/GetAccountsListInnertubeRequest.md new file mode 100644 index 00000000..b0262849 --- /dev/null +++ b/docs/api/type-aliases/GetAccountsListInnertubeRequest.md @@ -0,0 +1,71 @@ +[youtubei.js](../README.md) / GetAccountsListInnertubeRequest + +# Type Alias: GetAccountsListInnertubeRequest + +> **GetAccountsListInnertubeRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L162) + +## Properties + +### callCircumstance? + +> `optional` **callCircumstance**: `"SUPPLEMENTAL_USER"` \| `"SWITCHING_USERS_FULL"` + +Defined in: [src/parser/types/CommandEndpoints.ts:168](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L168) + +*** + +### channelSwitcherQuery? + +> `optional` **channelSwitcherQuery**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:165](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L165) + +*** + +### contentOwnerConfig? + +> `optional` **contentOwnerConfig**: `Record`\<`string`, `any`\> + +Defined in: [src/parser/types/CommandEndpoints.ts:167](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L167) + +*** + +### nextNavendpoint? + +> `optional` **nextNavendpoint**: [`NextNavendpoint`](NextNavendpoint.md) + +Defined in: [src/parser/types/CommandEndpoints.ts:164](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L164) + +*** + +### obfuscatedSelectedGaiaId? + +> `optional` **obfuscatedSelectedGaiaId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L169) + +*** + +### requestType? + +> `optional` **requestType**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:163](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L163) + +*** + +### selectedSerializedDelegationContext? + +> `optional` **selectedSerializedDelegationContext**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:170](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L170) + +*** + +### triggerChannelCreation? + +> `optional` **triggerChannelCreation**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:166](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L166) diff --git a/docs/api/type-aliases/GetKidsBlocklistPickerRequest.md b/docs/api/type-aliases/GetKidsBlocklistPickerRequest.md new file mode 100644 index 00000000..23fbe3b4 --- /dev/null +++ b/docs/api/type-aliases/GetKidsBlocklistPickerRequest.md @@ -0,0 +1,19 @@ +[youtubei.js](../README.md) / GetKidsBlocklistPickerRequest + +# Type Alias: GetKidsBlocklistPickerRequest + +> **GetKidsBlocklistPickerRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:173](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L173) + +## Properties + +### blockedForKidsContent? + +> `optional` **blockedForKidsContent**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:174](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L174) + +#### external\_channel\_id + +> **external\_channel\_id**: `string` diff --git a/docs/api/type-aliases/IBrowseResponse.md b/docs/api/type-aliases/IBrowseResponse.md new file mode 100644 index 00000000..5efe33eb --- /dev/null +++ b/docs/api/type-aliases/IBrowseResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / IBrowseResponse + +# Type Alias: IBrowseResponse + +> **IBrowseResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"background"` \| `"continuation_contents"` \| `"continuation_contents_memo"` \| `"on_response_received_actions"` \| `"on_response_received_actions_memo"` \| `"on_response_received_endpoints"` \| `"on_response_received_endpoints_memo"` \| `"contents"` \| `"contents_memo"` \| `"header"` \| `"header_memo"` \| `"metadata"` \| `"microformat"` \| `"alerts"` \| `"sidebar"` \| `"sidebar_memo"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:143](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L143) diff --git a/docs/api/type-aliases/IGetChallengeResponse.md b/docs/api/type-aliases/IGetChallengeResponse.md new file mode 100644 index 00000000..0c68fa96 --- /dev/null +++ b/docs/api/type-aliases/IGetChallengeResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / IGetChallengeResponse + +# Type Alias: IGetChallengeResponse + +> **IGetChallengeResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"challenge"` \| `"bg_challenge"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:150](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L150) diff --git a/docs/api/type-aliases/IGetNotificationsMenuResponse.md b/docs/api/type-aliases/IGetNotificationsMenuResponse.md new file mode 100644 index 00000000..ef30c0e8 --- /dev/null +++ b/docs/api/type-aliases/IGetNotificationsMenuResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / IGetNotificationsMenuResponse + +# Type Alias: IGetNotificationsMenuResponse + +> **IGetNotificationsMenuResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"actions"` \| `"actions_memo"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:147](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L147) diff --git a/docs/api/type-aliases/IGetTranscriptResponse.md b/docs/api/type-aliases/IGetTranscriptResponse.md new file mode 100644 index 00000000..b7061c0b --- /dev/null +++ b/docs/api/type-aliases/IGetTranscriptResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / IGetTranscriptResponse + +# Type Alias: IGetTranscriptResponse + +> **IGetTranscriptResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"actions"` \| `"actions_memo"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:146](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L146) diff --git a/docs/api/type-aliases/IGuideResponse.md b/docs/api/type-aliases/IGuideResponse.md new file mode 100644 index 00000000..833dbf40 --- /dev/null +++ b/docs/api/type-aliases/IGuideResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / IGuideResponse + +# Type Alias: IGuideResponse + +> **IGuideResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"items"` \| `"items_memo"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:149](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L149) diff --git a/docs/api/type-aliases/INextResponse.md b/docs/api/type-aliases/INextResponse.md new file mode 100644 index 00000000..cdb3a796 --- /dev/null +++ b/docs/api/type-aliases/INextResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / INextResponse + +# Type Alias: INextResponse + +> **INextResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"contents"` \| `"contents_memo"` \| `"continuation_contents"` \| `"continuation_contents_memo"` \| `"current_video_endpoint"` \| `"on_response_received_endpoints"` \| `"on_response_received_endpoints_memo"` \| `"player_overlays"` \| `"engagement_panels"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:142](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L142) diff --git a/docs/api/type-aliases/IPlayerResponse.md b/docs/api/type-aliases/IPlayerResponse.md new file mode 100644 index 00000000..99d20ed2 --- /dev/null +++ b/docs/api/type-aliases/IPlayerResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / IPlayerResponse + +# Type Alias: IPlayerResponse + +> **IPlayerResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"captions"` \| `"cards"` \| `"endscreen"` \| `"microformat"` \| `"annotations"` \| `"playability_status"` \| `"streaming_data"` \| `"player_config"` \| `"playback_tracking"` \| `"storyboards"` \| `"video_details"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:141](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L141) diff --git a/docs/api/type-aliases/IResolveURLResponse.md b/docs/api/type-aliases/IResolveURLResponse.md new file mode 100644 index 00000000..eed44e0a --- /dev/null +++ b/docs/api/type-aliases/IResolveURLResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / IResolveURLResponse + +# Type Alias: IResolveURLResponse + +> **IResolveURLResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"endpoint"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:145](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L145) diff --git a/docs/api/type-aliases/ISearchResponse.md b/docs/api/type-aliases/ISearchResponse.md new file mode 100644 index 00000000..4c547ad9 --- /dev/null +++ b/docs/api/type-aliases/ISearchResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / ISearchResponse + +# Type Alias: ISearchResponse + +> **ISearchResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"header"` \| `"header_memo"` \| `"contents"` \| `"contents_memo"` \| `"on_response_received_commands"` \| `"continuation_contents"` \| `"continuation_contents_memo"` \| `"refinements"` \| `"estimated_results"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L144) diff --git a/docs/api/type-aliases/IUpdatedMetadataResponse.md b/docs/api/type-aliases/IUpdatedMetadataResponse.md new file mode 100644 index 00000000..d618e110 --- /dev/null +++ b/docs/api/type-aliases/IUpdatedMetadataResponse.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / IUpdatedMetadataResponse + +# Type Alias: IUpdatedMetadataResponse + +> **IUpdatedMetadataResponse** = `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"actions"` \| `"actions_memo"` \| `"continuation"`\> + +Defined in: [src/parser/types/ParsedResponse.ts:148](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/ParsedResponse.ts#L148) diff --git a/docs/api/type-aliases/InlineSettingStatus.md b/docs/api/type-aliases/InlineSettingStatus.md new file mode 100644 index 00000000..2dd341cd --- /dev/null +++ b/docs/api/type-aliases/InlineSettingStatus.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / InlineSettingStatus + +# Type Alias: InlineSettingStatus + +> **InlineSettingStatus** = `"INLINE_SETTING_STATUS_DISABLED"` \| `"INLINE_SETTING_STATUS_ON"` + +Defined in: [src/parser/types/CommandEndpoints.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L33) diff --git a/docs/api/type-aliases/InnertubeEndpoint.md b/docs/api/type-aliases/InnertubeEndpoint.md index 213f1173..cf568eeb 100644 --- a/docs/api/type-aliases/InnertubeEndpoint.md +++ b/docs/api/type-aliases/InnertubeEndpoint.md @@ -4,4 +4,4 @@ > **InnertubeEndpoint** = `"/player"` \| `"/search"` \| `"/browse"` \| `"/next"` \| `"/reel"` \| `"/updated_metadata"` \| `"/notification/get_notification_menu"` \| `"/att/get"` \| `string` -Defined in: [src/core/Actions.ts:24](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L24) +Defined in: [src/core/Actions.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L24) diff --git a/docs/api/type-aliases/LikeRequest.md b/docs/api/type-aliases/LikeRequest.md new file mode 100644 index 00000000..33f49152 --- /dev/null +++ b/docs/api/type-aliases/LikeRequest.md @@ -0,0 +1,23 @@ +[youtubei.js](../README.md) / LikeRequest + +# Type Alias: LikeRequest + +> **LikeRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L50) + +## Properties + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:52](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L52) + +*** + +### target? + +> `optional` **target**: [`LikeTarget`](LikeTarget.md) + +Defined in: [src/parser/types/CommandEndpoints.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L51) diff --git a/docs/api/type-aliases/LikeTarget.md b/docs/api/type-aliases/LikeTarget.md new file mode 100644 index 00000000..3c6e1ddd --- /dev/null +++ b/docs/api/type-aliases/LikeTarget.md @@ -0,0 +1,15 @@ +[youtubei.js](../README.md) / LikeTarget + +# Type Alias: LikeTarget + +> **LikeTarget** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L46) + +## Properties + +### videoId + +> **videoId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L47) diff --git a/docs/api/type-aliases/LiveChatItemContextMenuRequest.md b/docs/api/type-aliases/LiveChatItemContextMenuRequest.md new file mode 100644 index 00000000..675a06e8 --- /dev/null +++ b/docs/api/type-aliases/LiveChatItemContextMenuRequest.md @@ -0,0 +1,15 @@ +[youtubei.js](../README.md) / LiveChatItemContextMenuRequest + +# Type Alias: LiveChatItemContextMenuRequest + +> **LiveChatItemContextMenuRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:152](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L152) + +## Properties + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:153](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L153) diff --git a/docs/api/type-aliases/ModifyChannelNotificationPreferenceRequest.md b/docs/api/type-aliases/ModifyChannelNotificationPreferenceRequest.md new file mode 100644 index 00000000..332624fd --- /dev/null +++ b/docs/api/type-aliases/ModifyChannelNotificationPreferenceRequest.md @@ -0,0 +1,23 @@ +[youtubei.js](../README.md) / ModifyChannelNotificationPreferenceRequest + +# Type Alias: ModifyChannelNotificationPreferenceRequest + +> **ModifyChannelNotificationPreferenceRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:194](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L194) + +## Properties + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L195) + +*** + +### secondaryParams? + +> `optional` **secondaryParams**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:196](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L196) diff --git a/docs/api/type-aliases/NextNavendpoint.md b/docs/api/type-aliases/NextNavendpoint.md new file mode 100644 index 00000000..d672315b --- /dev/null +++ b/docs/api/type-aliases/NextNavendpoint.md @@ -0,0 +1,19 @@ +[youtubei.js](../README.md) / NextNavendpoint + +# Type Alias: NextNavendpoint + +> **NextNavendpoint** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:156](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L156) + +## Properties + +### urlEndpoint + +> **urlEndpoint**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:157](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L157) + +#### url + +> **url**: `string` diff --git a/docs/api/type-aliases/OAuth2AuthErrorEventHandler.md b/docs/api/type-aliases/OAuth2AuthErrorEventHandler.md index 1e40733d..b614112b 100644 --- a/docs/api/type-aliases/OAuth2AuthErrorEventHandler.md +++ b/docs/api/type-aliases/OAuth2AuthErrorEventHandler.md @@ -4,7 +4,7 @@ > **OAuth2AuthErrorEventHandler** = (`err`) => `void` -Defined in: [src/core/OAuth2.ts:33](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L33) +Defined in: [src/core/OAuth2.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L33) ## Parameters diff --git a/docs/api/type-aliases/OAuth2AuthEventHandler.md b/docs/api/type-aliases/OAuth2AuthEventHandler.md index 8f449110..8f3fb37e 100644 --- a/docs/api/type-aliases/OAuth2AuthEventHandler.md +++ b/docs/api/type-aliases/OAuth2AuthEventHandler.md @@ -4,7 +4,7 @@ > **OAuth2AuthEventHandler** = (`data`) => `void` -Defined in: [src/core/OAuth2.ts:31](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L31) +Defined in: [src/core/OAuth2.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L31) ## Parameters diff --git a/docs/api/type-aliases/OAuth2AuthPendingEventHandler.md b/docs/api/type-aliases/OAuth2AuthPendingEventHandler.md index 06db3508..89e1d01a 100644 --- a/docs/api/type-aliases/OAuth2AuthPendingEventHandler.md +++ b/docs/api/type-aliases/OAuth2AuthPendingEventHandler.md @@ -4,7 +4,7 @@ > **OAuth2AuthPendingEventHandler** = (`data`) => `void` -Defined in: [src/core/OAuth2.ts:32](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L32) +Defined in: [src/core/OAuth2.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L32) ## Parameters diff --git a/docs/api/type-aliases/OAuth2ClientID.md b/docs/api/type-aliases/OAuth2ClientID.md index 3df8f89e..d3ce5bbd 100644 --- a/docs/api/type-aliases/OAuth2ClientID.md +++ b/docs/api/type-aliases/OAuth2ClientID.md @@ -4,7 +4,7 @@ > **OAuth2ClientID** = `object` -Defined in: [src/core/OAuth2.ts:7](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L7) +Defined in: [src/core/OAuth2.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L7) ## Properties @@ -12,7 +12,7 @@ Defined in: [src/core/OAuth2.ts:7](https://github.com/LuanRT/YouTube.js/blob/41b > **client\_id**: `string` -Defined in: [src/core/OAuth2.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L8) +Defined in: [src/core/OAuth2.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L8) *** @@ -20,4 +20,4 @@ Defined in: [src/core/OAuth2.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b > **client\_secret**: `string` -Defined in: [src/core/OAuth2.ts:9](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L9) +Defined in: [src/core/OAuth2.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L9) diff --git a/docs/api/type-aliases/OAuth2Tokens.md b/docs/api/type-aliases/OAuth2Tokens.md index e237e932..95b02fef 100644 --- a/docs/api/type-aliases/OAuth2Tokens.md +++ b/docs/api/type-aliases/OAuth2Tokens.md @@ -4,7 +4,7 @@ > **OAuth2Tokens** = `object` -Defined in: [src/core/OAuth2.ts:12](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L12) +Defined in: [src/core/OAuth2.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L12) ## Properties @@ -12,7 +12,7 @@ Defined in: [src/core/OAuth2.ts:12](https://github.com/LuanRT/YouTube.js/blob/41 > **access\_token**: `string` -Defined in: [src/core/OAuth2.ts:13](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L13) +Defined in: [src/core/OAuth2.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L13) *** @@ -20,7 +20,7 @@ Defined in: [src/core/OAuth2.ts:13](https://github.com/LuanRT/YouTube.js/blob/41 > `optional` **client**: [`OAuth2ClientID`](OAuth2ClientID.md) -Defined in: [src/core/OAuth2.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L19) +Defined in: [src/core/OAuth2.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L19) *** @@ -28,7 +28,7 @@ Defined in: [src/core/OAuth2.ts:19](https://github.com/LuanRT/YouTube.js/blob/41 > `optional` **expires\_in**: `number` -Defined in: [src/core/OAuth2.ts:15](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L15) +Defined in: [src/core/OAuth2.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L15) *** @@ -36,7 +36,7 @@ Defined in: [src/core/OAuth2.ts:15](https://github.com/LuanRT/YouTube.js/blob/41 > **expiry\_date**: `string` -Defined in: [src/core/OAuth2.ts:14](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L14) +Defined in: [src/core/OAuth2.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L14) *** @@ -44,7 +44,7 @@ Defined in: [src/core/OAuth2.ts:14](https://github.com/LuanRT/YouTube.js/blob/41 > **refresh\_token**: `string` -Defined in: [src/core/OAuth2.ts:16](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L16) +Defined in: [src/core/OAuth2.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L16) *** @@ -52,7 +52,7 @@ Defined in: [src/core/OAuth2.ts:16](https://github.com/LuanRT/YouTube.js/blob/41 > `optional` **scope**: `string` -Defined in: [src/core/OAuth2.ts:17](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L17) +Defined in: [src/core/OAuth2.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L17) *** @@ -60,4 +60,4 @@ Defined in: [src/core/OAuth2.ts:17](https://github.com/LuanRT/YouTube.js/blob/41 > `optional` **token\_type**: `string` -Defined in: [src/core/OAuth2.ts:18](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L18) +Defined in: [src/core/OAuth2.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/OAuth2.ts#L18) diff --git a/docs/api/type-aliases/ParsedResponse.md b/docs/api/type-aliases/ParsedResponse.md index 29114418..f63e5038 100644 --- a/docs/api/type-aliases/ParsedResponse.md +++ b/docs/api/type-aliases/ParsedResponse.md @@ -4,7 +4,7 @@ > **ParsedResponse**\<`T`\> = `T` *extends* `"/player"` ? [`IPlayerResponse`](IPlayerResponse.md) : `T` *extends* `"/search"` ? [`ISearchResponse`](ISearchResponse.md) : `T` *extends* `"/browse"` ? [`IBrowseResponse`](IBrowseResponse.md) : `T` *extends* `"/next"` ? [`INextResponse`](INextResponse.md) : `T` *extends* `"/updated_metadata"` ? [`IUpdatedMetadataResponse`](IUpdatedMetadataResponse.md) : `T` *extends* `"/navigation/resolve_url"` ? [`IResolveURLResponse`](IResolveURLResponse.md) : `T` *extends* `"/notification/get_notification_menu"` ? [`IGetNotificationsMenuResponse`](IGetNotificationsMenuResponse.md) : `T` *extends* `"/att/get"` ? [`IGetChallengeResponse`](IGetChallengeResponse.md) : [`IParsedResponse`](../interfaces/IParsedResponse.md) -Defined in: [src/core/Actions.ts:35](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L35) +Defined in: [src/core/Actions.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Actions.ts#L35) ## Type Parameters diff --git a/docs/api/type-aliases/PerformCommentActionRequest.md b/docs/api/type-aliases/PerformCommentActionRequest.md new file mode 100644 index 00000000..dd803a6d --- /dev/null +++ b/docs/api/type-aliases/PerformCommentActionRequest.md @@ -0,0 +1,15 @@ +[youtubei.js](../README.md) / PerformCommentActionRequest + +# Type Alias: PerformCommentActionRequest + +> **PerformCommentActionRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:190](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L190) + +## Properties + +### actions? + +> `optional` **actions**: `Record`\<`string`, `any`\>[] + +Defined in: [src/parser/types/CommandEndpoints.ts:191](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L191) diff --git a/docs/api/type-aliases/PlaylistEditRequest.md b/docs/api/type-aliases/PlaylistEditRequest.md new file mode 100644 index 00000000..01a9d2f4 --- /dev/null +++ b/docs/api/type-aliases/PlaylistEditRequest.md @@ -0,0 +1,31 @@ +[youtubei.js](../README.md) / PlaylistEditRequest + +# Type Alias: PlaylistEditRequest + +> **PlaylistEditRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:96](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L96) + +## Properties + +### actions? + +> `optional` **actions**: `Record`\<`string`, `any`\>[] + +Defined in: [src/parser/types/CommandEndpoints.ts:97](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L97) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:99](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L99) + +*** + +### playlistId? + +> `optional` **playlistId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:98](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L98) diff --git a/docs/api/type-aliases/PlaylistPrivacyStatus.md b/docs/api/type-aliases/PlaylistPrivacyStatus.md new file mode 100644 index 00000000..7a6abc8d --- /dev/null +++ b/docs/api/type-aliases/PlaylistPrivacyStatus.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / PlaylistPrivacyStatus + +# Type Alias: PlaylistPrivacyStatus + +> **PlaylistPrivacyStatus** = `"PUBLIC"` \| `"UNLISTED"` \| `"PRIVATE"` + +Defined in: [src/parser/types/CommandEndpoints.ts:102](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L102) diff --git a/docs/api/type-aliases/RawData.md b/docs/api/type-aliases/RawData.md new file mode 100644 index 00000000..352a4ac7 --- /dev/null +++ b/docs/api/type-aliases/RawData.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / RawData + +# Type Alias: RawData + +> **RawData** = [`RawNode`](RawNode.md) \| [`RawNode`](RawNode.md)[] + +Defined in: [src/parser/types/RawResponse.ts:2](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L2) diff --git a/docs/api/type-aliases/RawNode.md b/docs/api/type-aliases/RawNode.md new file mode 100644 index 00000000..aa214ccf --- /dev/null +++ b/docs/api/type-aliases/RawNode.md @@ -0,0 +1,7 @@ +[youtubei.js](../README.md) / RawNode + +# Type Alias: RawNode + +> **RawNode** = `Record`\<`string`, `any`\> + +Defined in: [src/parser/types/RawResponse.ts:1](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/RawResponse.ts#L1) diff --git a/docs/api/type-aliases/ReelWatchRequest.md b/docs/api/type-aliases/ReelWatchRequest.md new file mode 100644 index 00000000..3310ba27 --- /dev/null +++ b/docs/api/type-aliases/ReelWatchRequest.md @@ -0,0 +1,55 @@ +[youtubei.js](../README.md) / ReelWatchRequest + +# Type Alias: ReelWatchRequest + +> **ReelWatchRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:84](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L84) + +## Properties + +### disablePlayerResponse? + +> `optional` **disablePlayerResponse**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:87](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L87) + +*** + +### inputType? + +> `optional` **inputType**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:85](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L85) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:86](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L86) + +*** + +### playerRequest? + +> `optional` **playerRequest**: `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:88](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L88) + +#### contentCheckOk? + +> `optional` **contentCheckOk**: `boolean` + +#### params? + +> `optional` **params**: `string` + +#### racyCheckOk? + +> `optional` **racyCheckOk**: `boolean` + +#### videoId + +> **videoId**: `string` diff --git a/docs/api/type-aliases/SWSessionData.md b/docs/api/type-aliases/SWSessionData.md index 6fabab12..b3d19dc2 100644 --- a/docs/api/type-aliases/SWSessionData.md +++ b/docs/api/type-aliases/SWSessionData.md @@ -4,7 +4,7 @@ > **SWSessionData** = `object` -Defined in: [src/core/Session.ts:228](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L228) +Defined in: [src/core/Session.ts:228](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L228) ## Properties @@ -12,7 +12,7 @@ Defined in: [src/core/Session.ts:228](https://github.com/LuanRT/YouTube.js/blob/ > **api\_key**: `string` -Defined in: [src/core/Session.ts:230](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L230) +Defined in: [src/core/Session.ts:230](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L230) *** @@ -20,7 +20,7 @@ Defined in: [src/core/Session.ts:230](https://github.com/LuanRT/YouTube.js/blob/ > **api\_version**: `string` -Defined in: [src/core/Session.ts:231](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L231) +Defined in: [src/core/Session.ts:231](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L231) *** @@ -28,4 +28,4 @@ Defined in: [src/core/Session.ts:231](https://github.com/LuanRT/YouTube.js/blob/ > **context\_data**: `ContextData` -Defined in: [src/core/Session.ts:229](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L229) +Defined in: [src/core/Session.ts:229](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L229) diff --git a/docs/api/type-aliases/SearchRequest.md b/docs/api/type-aliases/SearchRequest.md new file mode 100644 index 00000000..3badfed7 --- /dev/null +++ b/docs/api/type-aliases/SearchRequest.md @@ -0,0 +1,39 @@ +[youtubei.js](../README.md) / SearchRequest + +# Type Alias: SearchRequest + +> **SearchRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:117](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L117) + +## Properties + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L119) + +*** + +### query? + +> `optional` **query**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:118](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L118) + +*** + +### suggestStats? + +> `optional` **suggestStats**: `unknown` + +Defined in: [src/parser/types/CommandEndpoints.ts:121](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L121) + +*** + +### webSearchboxStatsUrl? + +> `optional` **webSearchboxStatsUrl**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:120](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L120) diff --git a/docs/api/type-aliases/SessionArgs.md b/docs/api/type-aliases/SessionArgs.md index 654ec316..b168ec4c 100644 --- a/docs/api/type-aliases/SessionArgs.md +++ b/docs/api/type-aliases/SessionArgs.md @@ -4,7 +4,7 @@ > **SessionArgs** = `object` -Defined in: [src/core/Session.ts:234](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L234) +Defined in: [src/core/Session.ts:234](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L234) ## Properties @@ -12,7 +12,7 @@ Defined in: [src/core/Session.ts:234](https://github.com/LuanRT/YouTube.js/blob/ > **client\_name**: [`ClientType`](../enumerations/ClientType.md) -Defined in: [src/core/Session.ts:240](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L240) +Defined in: [src/core/Session.ts:240](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L240) *** @@ -20,7 +20,7 @@ Defined in: [src/core/Session.ts:240](https://github.com/LuanRT/YouTube.js/blob/ > **device\_category**: [`DeviceCategory`](../youtubei.js/namespaces/Utils/type-aliases/DeviceCategory.md) -Defined in: [src/core/Session.ts:239](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L239) +Defined in: [src/core/Session.ts:239](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L239) *** @@ -28,7 +28,7 @@ Defined in: [src/core/Session.ts:239](https://github.com/LuanRT/YouTube.js/blob/ > **enable\_safety\_mode**: `boolean` -Defined in: [src/core/Session.ts:241](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L241) +Defined in: [src/core/Session.ts:241](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L241) *** @@ -36,7 +36,7 @@ Defined in: [src/core/Session.ts:241](https://github.com/LuanRT/YouTube.js/blob/ > **lang**: `string` -Defined in: [src/core/Session.ts:235](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L235) +Defined in: [src/core/Session.ts:235](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L235) *** @@ -44,7 +44,7 @@ Defined in: [src/core/Session.ts:235](https://github.com/LuanRT/YouTube.js/blob/ > **location**: `string` -Defined in: [src/core/Session.ts:236](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L236) +Defined in: [src/core/Session.ts:236](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L236) *** @@ -52,7 +52,7 @@ Defined in: [src/core/Session.ts:236](https://github.com/LuanRT/YouTube.js/blob/ > **on\_behalf\_of\_user**: `string` \| `undefined` -Defined in: [src/core/Session.ts:243](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L243) +Defined in: [src/core/Session.ts:243](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L243) *** @@ -60,7 +60,7 @@ Defined in: [src/core/Session.ts:243](https://github.com/LuanRT/YouTube.js/blob/ > **time\_zone**: `string` -Defined in: [src/core/Session.ts:237](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L237) +Defined in: [src/core/Session.ts:237](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L237) *** @@ -68,7 +68,7 @@ Defined in: [src/core/Session.ts:237](https://github.com/LuanRT/YouTube.js/blob/ > **user\_agent**: `string` -Defined in: [src/core/Session.ts:238](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L238) +Defined in: [src/core/Session.ts:238](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L238) *** @@ -76,4 +76,4 @@ Defined in: [src/core/Session.ts:238](https://github.com/LuanRT/YouTube.js/blob/ > **visitor\_data**: `string` -Defined in: [src/core/Session.ts:242](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L242) +Defined in: [src/core/Session.ts:242](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L242) diff --git a/docs/api/type-aliases/SessionData.md b/docs/api/type-aliases/SessionData.md index bd91efe8..22ee22db 100644 --- a/docs/api/type-aliases/SessionData.md +++ b/docs/api/type-aliases/SessionData.md @@ -4,7 +4,7 @@ > **SessionData** = `object` -Defined in: [src/core/Session.ts:217](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L217) +Defined in: [src/core/Session.ts:217](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L217) ## Properties @@ -12,7 +12,7 @@ Defined in: [src/core/Session.ts:217](https://github.com/LuanRT/YouTube.js/blob/ > **api\_key**: `string` -Defined in: [src/core/Session.ts:219](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L219) +Defined in: [src/core/Session.ts:219](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L219) *** @@ -20,7 +20,7 @@ Defined in: [src/core/Session.ts:219](https://github.com/LuanRT/YouTube.js/blob/ > **api\_version**: `string` -Defined in: [src/core/Session.ts:220](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L220) +Defined in: [src/core/Session.ts:220](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L220) *** @@ -28,7 +28,7 @@ Defined in: [src/core/Session.ts:220](https://github.com/LuanRT/YouTube.js/blob/ > `optional` **config\_data**: `string` -Defined in: [src/core/Session.ts:221](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L221) +Defined in: [src/core/Session.ts:221](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L221) *** @@ -36,4 +36,4 @@ Defined in: [src/core/Session.ts:221](https://github.com/LuanRT/YouTube.js/blob/ > **context**: [`Context`](Context.md) -Defined in: [src/core/Session.ts:218](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L218) +Defined in: [src/core/Session.ts:218](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L218) diff --git a/docs/api/type-aliases/SessionOptions.md b/docs/api/type-aliases/SessionOptions.md index d36d3601..69066ff3 100644 --- a/docs/api/type-aliases/SessionOptions.md +++ b/docs/api/type-aliases/SessionOptions.md @@ -4,7 +4,7 @@ > **SessionOptions** = `object` -Defined in: [src/core/Session.ts:127](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L127) +Defined in: [src/core/Session.ts:127](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L127) ## Properties @@ -12,7 +12,7 @@ Defined in: [src/core/Session.ts:127](https://github.com/LuanRT/YouTube.js/blob/ > `optional` **account\_index**: `number` -Defined in: [src/core/Session.ts:145](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L145) +Defined in: [src/core/Session.ts:145](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L145) The account index to use. This is useful if you have multiple accounts logged in. @@ -24,7 +24,7 @@ The account index to use. This is useful if you have multiple accounts logged in > `optional` **cache**: [`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md) -Defined in: [src/core/Session.ts:191](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L191) +Defined in: [src/core/Session.ts:191](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L191) Used to cache algorithms, session data, and OAuth2 tokens. @@ -34,7 +34,7 @@ Used to cache algorithms, session data, and OAuth2 tokens. > `optional` **client\_type**: [`ClientType`](../enumerations/ClientType.md) -Defined in: [src/core/Session.ts:183](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L183) +Defined in: [src/core/Session.ts:183](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L183) InnerTube client type. @@ -44,7 +44,7 @@ InnerTube client type. > `optional` **cookie**: `string` -Defined in: [src/core/Session.ts:195](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L195) +Defined in: [src/core/Session.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L195) YouTube cookies. @@ -54,7 +54,7 @@ YouTube cookies. > `optional` **device\_category**: [`DeviceCategory`](../youtubei.js/namespaces/Utils/type-aliases/DeviceCategory.md) -Defined in: [src/core/Session.ts:179](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L179) +Defined in: [src/core/Session.ts:179](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L179) Platform to use for the session. @@ -64,7 +64,7 @@ Platform to use for the session. > `optional` **enable\_safety\_mode**: `boolean` -Defined in: [src/core/Session.ts:159](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L159) +Defined in: [src/core/Session.ts:159](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L159) Specifies whether to enable safety mode. This will prevent the session from loading any potentially unsafe content. @@ -74,7 +74,7 @@ Specifies whether to enable safety mode. This will prevent the session from load > `optional` **enable\_session\_cache**: `boolean` -Defined in: [src/core/Session.ts:175](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L175) +Defined in: [src/core/Session.ts:175](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L175) Specifies whether the session data should be cached. @@ -84,7 +84,7 @@ Specifies whether the session data should be cached. > `optional` **fetch**: [`FetchFunction`](../youtubei.js/namespaces/Types/type-aliases/FetchFunction.md) -Defined in: [src/core/Session.ts:204](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L204) +Defined in: [src/core/Session.ts:204](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L204) Fetch function to use. @@ -94,7 +94,7 @@ Fetch function to use. > `optional` **generate\_session\_locally**: `boolean` -Defined in: [src/core/Session.ts:171](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L171) +Defined in: [src/core/Session.ts:171](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L171) Specifies whether to generate the session data locally or retrieve it from YouTube. This can be useful if you need more performance. @@ -108,7 +108,7 @@ If you want to force a new session to be generated, you must clear the cache or > `optional` **lang**: `string` -Defined in: [src/core/Session.ts:131](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L131) +Defined in: [src/core/Session.ts:131](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L131) Language. @@ -118,7 +118,7 @@ Language. > `optional` **location**: `string` -Defined in: [src/core/Session.ts:135](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L135) +Defined in: [src/core/Session.ts:135](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L135) Geolocation. @@ -128,7 +128,7 @@ Geolocation. > `optional` **on\_behalf\_of\_user**: `string` -Defined in: [src/core/Session.ts:149](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L149) +Defined in: [src/core/Session.ts:149](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L149) Specify the Page ID of the YouTube profile/channel to use, if the logged-in account has multiple profiles. @@ -138,7 +138,7 @@ Specify the Page ID of the YouTube profile/channel to use, if the logged-in acco > `optional` **player\_id**: `string` -Defined in: [src/core/Session.ts:214](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L214) +Defined in: [src/core/Session.ts:214](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L214) Player ID override. In most cases, this isn't necessary; but when YouTube introduces breaking changes, @@ -150,7 +150,7 @@ forcing an older Player ID can help work around temporary issues. > `optional` **po\_token**: `string` -Defined in: [src/core/Session.ts:208](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L208) +Defined in: [src/core/Session.ts:208](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L208) Session bound Proof of Origin Token. This is an attestation token generated by BotGuard/DroidGuard. It is used to confirm that the request is coming from a real client. @@ -160,7 +160,7 @@ Session bound Proof of Origin Token. This is an attestation token generated by B > `optional` **retrieve\_innertube\_config**: `boolean` -Defined in: [src/core/Session.ts:163](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L163) +Defined in: [src/core/Session.ts:163](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L163) Specifies whether to retrieve the InnerTube config. Useful for "onesie" requests. @@ -170,7 +170,7 @@ Specifies whether to retrieve the InnerTube config. Useful for "onesie" requests > `optional` **retrieve\_player**: `boolean` -Defined in: [src/core/Session.ts:155](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L155) +Defined in: [src/core/Session.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L155) Specifies whether to retrieve the JS player. Disabling this will make session creation faster. @@ -182,7 +182,7 @@ Specifies whether to retrieve the JS player. Disabling this will make session cr > `optional` **timezone**: `string` -Defined in: [src/core/Session.ts:187](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L187) +Defined in: [src/core/Session.ts:187](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L187) The time zone. @@ -192,7 +192,7 @@ The time zone. > `optional` **user\_agent**: `string` -Defined in: [src/core/Session.ts:139](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L139) +Defined in: [src/core/Session.ts:139](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L139) User agent (InnerTube requests only). @@ -202,7 +202,7 @@ User agent (InnerTube requests only). > `optional` **visitor\_data**: `string` -Defined in: [src/core/Session.ts:200](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L200) +Defined in: [src/core/Session.ts:200](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/Session.ts#L200) Setting this to a valid and persistent visitor data string will allow YouTube to give this session tailored content even when not logged in. A good way to get a valid one is by either grabbing it from a browser or calling InnerTube's `/visitor_id` endpoint. diff --git a/docs/api/type-aliases/ShareEntityServiceRequest.md b/docs/api/type-aliases/ShareEntityServiceRequest.md new file mode 100644 index 00000000..b05d73aa --- /dev/null +++ b/docs/api/type-aliases/ShareEntityServiceRequest.md @@ -0,0 +1,23 @@ +[youtubei.js](../README.md) / ShareEntityServiceRequest + +# Type Alias: ShareEntityServiceRequest + +> **ShareEntityServiceRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:138](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L138) + +## Properties + +### clientParams? + +> `optional` **clientParams**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:140](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L140) + +*** + +### serializedSharedEntity? + +> `optional` **serializedSharedEntity**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:139](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L139) diff --git a/docs/api/type-aliases/SubscribeRequest.md b/docs/api/type-aliases/SubscribeRequest.md new file mode 100644 index 00000000..fda3f798 --- /dev/null +++ b/docs/api/type-aliases/SubscribeRequest.md @@ -0,0 +1,47 @@ +[youtubei.js](../README.md) / SubscribeRequest + +# Type Alias: SubscribeRequest + +> **SubscribeRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:124](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L124) + +## Properties + +### botguardResponse? + +> `optional` **botguardResponse**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:128](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L128) + +*** + +### channelIds? + +> `optional` **channelIds**: `string`[] + +Defined in: [src/parser/types/CommandEndpoints.ts:125](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L125) + +*** + +### clientFeature? + +> `optional` **clientFeature**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:129](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L129) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:127](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L127) + +*** + +### siloName? + +> `optional` **siloName**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L126) diff --git a/docs/api/type-aliases/UnsubscribeRequest.md b/docs/api/type-aliases/UnsubscribeRequest.md new file mode 100644 index 00000000..caf53664 --- /dev/null +++ b/docs/api/type-aliases/UnsubscribeRequest.md @@ -0,0 +1,31 @@ +[youtubei.js](../README.md) / UnsubscribeRequest + +# Type Alias: UnsubscribeRequest + +> **UnsubscribeRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:132](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L132) + +## Properties + +### channelIds? + +> `optional` **channelIds**: `string`[] + +Defined in: [src/parser/types/CommandEndpoints.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L133) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:135](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L135) + +*** + +### siloName? + +> `optional` **siloName**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:134](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L134) diff --git a/docs/api/type-aliases/WatchNextRequest.md b/docs/api/type-aliases/WatchNextRequest.md new file mode 100644 index 00000000..7fba465d --- /dev/null +++ b/docs/api/type-aliases/WatchNextRequest.md @@ -0,0 +1,55 @@ +[youtubei.js](../README.md) / WatchNextRequest + +# Type Alias: WatchNextRequest + +> **WatchNextRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:75](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L75) + +## Properties + +### contentCheckOk? + +> `optional` **contentCheckOk**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:81](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L81) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:79](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L79) + +*** + +### playlistId? + +> `optional` **playlistId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:77](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L77) + +*** + +### playlistIndex? + +> `optional` **playlistIndex**: `number` + +Defined in: [src/parser/types/CommandEndpoints.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L78) + +*** + +### racyCheckOk? + +> `optional` **racyCheckOk**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:80](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L80) + +*** + +### videoId? + +> `optional` **videoId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:76](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L76) diff --git a/docs/api/type-aliases/WatchRequest.md b/docs/api/type-aliases/WatchRequest.md new file mode 100644 index 00000000..d52a62fd --- /dev/null +++ b/docs/api/type-aliases/WatchRequest.md @@ -0,0 +1,87 @@ +[youtubei.js](../README.md) / WatchRequest + +# Type Alias: WatchRequest + +> **WatchRequest** = `object` + +Defined in: [src/parser/types/CommandEndpoints.ts:62](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L62) + +## Properties + +### contentCheckOk? + +> `optional` **contentCheckOk**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:70](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L70) + +*** + +### disablePlayerResponse? + +> `optional` **disablePlayerResponse**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:71](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L71) + +*** + +### overrideMutedAtStart? + +> `optional` **overrideMutedAtStart**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L68) + +*** + +### params? + +> `optional` **params**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:66](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L66) + +*** + +### playerRequest? + +> `optional` **playerRequest**: `Record`\<`string`, `any`\> + +Defined in: [src/parser/types/CommandEndpoints.ts:72](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L72) + +*** + +### playlistId? + +> `optional` **playlistId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L64) + +*** + +### playlistIndex? + +> `optional` **playlistIndex**: `number` + +Defined in: [src/parser/types/CommandEndpoints.ts:65](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L65) + +*** + +### racyCheckOk? + +> `optional` **racyCheckOk**: `boolean` + +Defined in: [src/parser/types/CommandEndpoints.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L69) + +*** + +### startTimeSecs? + +> `optional` **startTimeSecs**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L67) + +*** + +### videoId? + +> `optional` **videoId**: `string` + +Defined in: [src/parser/types/CommandEndpoints.ts:63](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/types/CommandEndpoints.ts#L63) diff --git a/docs/api/youtubei.js/namespaces/APIResponseTypes/README.md b/docs/api/youtubei.js/namespaces/APIResponseTypes/README.md new file mode 100644 index 00000000..971ae754 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/APIResponseTypes/README.md @@ -0,0 +1,315 @@ +[youtubei.js](../../../README.md) / APIResponseTypes + +# APIResponseTypes + +## References + +### AddToPlaylistServiceRequest + +Re-exports [AddToPlaylistServiceRequest](../../../type-aliases/AddToPlaylistServiceRequest.md) + +*** + +### BrowseRequest + +Re-exports [BrowseRequest](../../../type-aliases/BrowseRequest.md) + +*** + +### BrowseRequestSupportedMetadata + +Re-exports [BrowseRequestSupportedMetadata](../../../type-aliases/BrowseRequestSupportedMetadata.md) + +*** + +### ContinuationRequest + +Re-exports [ContinuationRequest](../../../type-aliases/ContinuationRequest.md) + +*** + +### CreateCommentRequest + +Re-exports [CreateCommentRequest](../../../type-aliases/CreateCommentRequest.md) + +*** + +### CreatePlaylistServiceRequest + +Re-exports [CreatePlaylistServiceRequest](../../../type-aliases/CreatePlaylistServiceRequest.md) + +*** + +### DeletePlaylistServiceRequest + +Re-exports [DeletePlaylistServiceRequest](../../../type-aliases/DeletePlaylistServiceRequest.md) + +*** + +### FeedbackContext + +Re-exports [FeedbackContext](../../../type-aliases/FeedbackContext.md) + +*** + +### FeedbackRequest + +Re-exports [FeedbackRequest](../../../type-aliases/FeedbackRequest.md) + +*** + +### FormData + +Re-exports [FormData](../../../type-aliases/FormData.md) + +*** + +### GetAccountsListInnertubeRequest + +Re-exports [GetAccountsListInnertubeRequest](../../../type-aliases/GetAccountsListInnertubeRequest.md) + +*** + +### GetKidsBlocklistPickerRequest + +Re-exports [GetKidsBlocklistPickerRequest](../../../type-aliases/GetKidsBlocklistPickerRequest.md) + +*** + +### IBotguardChallenge + +Re-exports [IBotguardChallenge](../../../interfaces/IBotguardChallenge.md) + +*** + +### IBrowseResponse + +Re-exports [IBrowseResponse](../../../type-aliases/IBrowseResponse.md) + +*** + +### IEndpoint + +Re-exports [IEndpoint](../../../interfaces/IEndpoint.md) + +*** + +### IGetChallengeResponse + +Re-exports [IGetChallengeResponse](../../../type-aliases/IGetChallengeResponse.md) + +*** + +### IGetNotificationsMenuResponse + +Re-exports [IGetNotificationsMenuResponse](../../../type-aliases/IGetNotificationsMenuResponse.md) + +*** + +### IGetTranscriptResponse + +Re-exports [IGetTranscriptResponse](../../../type-aliases/IGetTranscriptResponse.md) + +*** + +### IGuideResponse + +Re-exports [IGuideResponse](../../../type-aliases/IGuideResponse.md) + +*** + +### INextResponse + +Re-exports [INextResponse](../../../type-aliases/INextResponse.md) + +*** + +### InlineSettingStatus + +Re-exports [InlineSettingStatus](../../../type-aliases/InlineSettingStatus.md) + +*** + +### IParsedResponse + +Re-exports [IParsedResponse](../../../interfaces/IParsedResponse.md) + +*** + +### IPlayabilityStatus + +Re-exports [IPlayabilityStatus](../../../interfaces/IPlayabilityStatus.md) + +*** + +### IPlaybackTracking + +Re-exports [IPlaybackTracking](../../../interfaces/IPlaybackTracking.md) + +*** + +### IPlayerConfig + +Re-exports [IPlayerConfig](../../../interfaces/IPlayerConfig.md) + +*** + +### IPlayerResponse + +Re-exports [IPlayerResponse](../../../type-aliases/IPlayerResponse.md) + +*** + +### IRawBotguardChallenge + +Re-exports [IRawBotguardChallenge](../../../interfaces/IRawBotguardChallenge.md) + +*** + +### IRawPlayerConfig + +Re-exports [IRawPlayerConfig](../../../interfaces/IRawPlayerConfig.md) + +*** + +### IRawResponse + +Re-exports [IRawResponse](../../../interfaces/IRawResponse.md) + +*** + +### IRawTrustedResource + +Re-exports [IRawTrustedResource](../../../interfaces/IRawTrustedResource.md) + +*** + +### IResolveURLResponse + +Re-exports [IResolveURLResponse](../../../type-aliases/IResolveURLResponse.md) + +*** + +### ISearchResponse + +Re-exports [ISearchResponse](../../../type-aliases/ISearchResponse.md) + +*** + +### IStreamingData + +Re-exports [IStreamingData](../../../interfaces/IStreamingData.md) + +*** + +### ITrustedResource + +Re-exports [ITrustedResource](../../../interfaces/ITrustedResource.md) + +*** + +### IUpdatedMetadataResponse + +Re-exports [IUpdatedMetadataResponse](../../../type-aliases/IUpdatedMetadataResponse.md) + +*** + +### LikeRequest + +Re-exports [LikeRequest](../../../type-aliases/LikeRequest.md) + +*** + +### LikeTarget + +Re-exports [LikeTarget](../../../type-aliases/LikeTarget.md) + +*** + +### LiveChatItemContextMenuRequest + +Re-exports [LiveChatItemContextMenuRequest](../../../type-aliases/LiveChatItemContextMenuRequest.md) + +*** + +### ModifyChannelNotificationPreferenceRequest + +Re-exports [ModifyChannelNotificationPreferenceRequest](../../../type-aliases/ModifyChannelNotificationPreferenceRequest.md) + +*** + +### NextNavendpoint + +Re-exports [NextNavendpoint](../../../type-aliases/NextNavendpoint.md) + +*** + +### PerformCommentActionRequest + +Re-exports [PerformCommentActionRequest](../../../type-aliases/PerformCommentActionRequest.md) + +*** + +### PlaylistEditRequest + +Re-exports [PlaylistEditRequest](../../../type-aliases/PlaylistEditRequest.md) + +*** + +### PlaylistPrivacyStatus + +Re-exports [PlaylistPrivacyStatus](../../../type-aliases/PlaylistPrivacyStatus.md) + +*** + +### RawData + +Re-exports [RawData](../../../type-aliases/RawData.md) + +*** + +### RawNode + +Re-exports [RawNode](../../../type-aliases/RawNode.md) + +*** + +### ReelWatchRequest + +Re-exports [ReelWatchRequest](../../../type-aliases/ReelWatchRequest.md) + +*** + +### SearchRequest + +Re-exports [SearchRequest](../../../type-aliases/SearchRequest.md) + +*** + +### ShareEntityServiceRequest + +Re-exports [ShareEntityServiceRequest](../../../type-aliases/ShareEntityServiceRequest.md) + +*** + +### SubscribeRequest + +Re-exports [SubscribeRequest](../../../type-aliases/SubscribeRequest.md) + +*** + +### UnsubscribeRequest + +Re-exports [UnsubscribeRequest](../../../type-aliases/UnsubscribeRequest.md) + +*** + +### WatchNextRequest + +Re-exports [WatchNextRequest](../../../type-aliases/WatchNextRequest.md) + +*** + +### WatchRequest + +Re-exports [WatchRequest](../../../type-aliases/WatchRequest.md) diff --git a/docs/api/namespaces/BinarySerializer/README.md b/docs/api/youtubei.js/namespaces/BinarySerializer/README.md similarity index 67% rename from docs/api/namespaces/BinarySerializer/README.md rename to docs/api/youtubei.js/namespaces/BinarySerializer/README.md index 79ec026f..f1c5b848 100644 --- a/docs/api/namespaces/BinarySerializer/README.md +++ b/docs/api/youtubei.js/namespaces/BinarySerializer/README.md @@ -1,15 +1,13 @@ -[youtubei.js](../../README.md) / BinarySerializer +[youtubei.js](../../../README.md) / BinarySerializer # BinarySerializer -## Index - -### Variables +## Variables - [MAGIC\_HEADER](variables/MAGIC_HEADER.md) - [VERSION](variables/VERSION.md) -### Functions +## Functions - [deserialize](functions/deserialize.md) - [serialize](functions/serialize.md) diff --git a/docs/api/youtubei.js/namespaces/BinarySerializer/functions/deserialize.md b/docs/api/youtubei.js/namespaces/BinarySerializer/functions/deserialize.md new file mode 100644 index 00000000..c8ad7ccd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/BinarySerializer/functions/deserialize.md @@ -0,0 +1,23 @@ +[youtubei.js](../../../../README.md) / [BinarySerializer](../README.md) / deserialize + +# Function: deserialize() + +> **deserialize**\<`T`\>(`buffer`): `T` + +Defined in: [src/utils/BinarySerializer.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/BinarySerializer.ts#L23) + +## Type Parameters + +### T + +`T` + +## Parameters + +### buffer + +`Uint8Array` + +## Returns + +`T` diff --git a/docs/api/youtubei.js/namespaces/BinarySerializer/functions/serialize.md b/docs/api/youtubei.js/namespaces/BinarySerializer/functions/serialize.md new file mode 100644 index 00000000..a9612875 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/BinarySerializer/functions/serialize.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [BinarySerializer](../README.md) / serialize + +# Function: serialize() + +> **serialize**(`data`): `ArrayBuffer` + +Defined in: [src/utils/BinarySerializer.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/BinarySerializer.ts#L6) + +## Parameters + +### data + +`any` + +## Returns + +`ArrayBuffer` diff --git a/docs/api/youtubei.js/namespaces/BinarySerializer/variables/MAGIC_HEADER.md b/docs/api/youtubei.js/namespaces/BinarySerializer/variables/MAGIC_HEADER.md new file mode 100644 index 00000000..3ba2a0ed --- /dev/null +++ b/docs/api/youtubei.js/namespaces/BinarySerializer/variables/MAGIC_HEADER.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [BinarySerializer](../README.md) / MAGIC\_HEADER + +# Variable: MAGIC\_HEADER + +> `const` **MAGIC\_HEADER**: `5849684` = `0x594254` + +Defined in: [src/utils/BinarySerializer.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/BinarySerializer.ts#L3) diff --git a/docs/api/youtubei.js/namespaces/BinarySerializer/variables/VERSION.md b/docs/api/youtubei.js/namespaces/BinarySerializer/variables/VERSION.md new file mode 100644 index 00000000..420e779c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/BinarySerializer/variables/VERSION.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [BinarySerializer](../README.md) / VERSION + +# Variable: VERSION + +> `const` **VERSION**: `1` = `1` + +Defined in: [src/utils/BinarySerializer.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/BinarySerializer.ts#L4) diff --git a/docs/api/namespaces/Clients/README.md b/docs/api/youtubei.js/namespaces/Clients/README.md similarity index 60% rename from docs/api/namespaces/Clients/README.md rename to docs/api/youtubei.js/namespaces/Clients/README.md index 839a4447..f1f7bf90 100644 --- a/docs/api/namespaces/Clients/README.md +++ b/docs/api/youtubei.js/namespaces/Clients/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / Clients +[youtubei.js](../../../README.md) / Clients # Clients -## Index - -### Classes +## Classes - [Kids](classes/Kids.md) - [Music](classes/Music.md) diff --git a/docs/api/youtubei.js/namespaces/Clients/classes/Kids.md b/docs/api/youtubei.js/namespaces/Clients/classes/Kids.md new file mode 100644 index 00000000..59a9e362 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Clients/classes/Kids.md @@ -0,0 +1,118 @@ +[youtubei.js](../../../../README.md) / [Clients](../README.md) / Kids + +# Class: Kids + +Defined in: [src/core/clients/Kids.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Kids.ts#L9) + +## Constructors + +### Constructor + +> **new Kids**(`session`): `Kids` + +Defined in: [src/core/clients/Kids.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Kids.ts#L12) + +#### Parameters + +##### session + +[`Session`](../../../../classes/Session.md) + +#### Returns + +`Kids` + +## Methods + +### blockChannel() + +> **blockChannel**(`channel_id`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)[]\> + +Defined in: [src/core/clients/Kids.ts:79](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Kids.ts#L79) + +Retrieves the list of supervised accounts that the signed-in user has +access to, and blocks the given channel for each of them. + +#### Parameters + +##### channel\_id + +`string` + +The channel id to block. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)[]\> + +A list of API responses. + +*** + +### getChannel() + +> **getChannel**(`channel_id`): `Promise`\<[`Channel`](../../YTKids/classes/Channel.md)\> + +Defined in: [src/core/clients/Kids.ts:61](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Kids.ts#L61) + +#### Parameters + +##### channel\_id + +`string` + +#### Returns + +`Promise`\<[`Channel`](../../YTKids/classes/Channel.md)\> + +*** + +### getHomeFeed() + +> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../../YTKids/classes/HomeFeed.md)\> + +Defined in: [src/core/clients/Kids.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Kids.ts#L67) + +#### Returns + +`Promise`\<[`HomeFeed`](../../YTKids/classes/HomeFeed.md)\> + +*** + +### getInfo() + +> **getInfo**(`video_id`, `options?`): `Promise`\<[`VideoInfo`](../../YTKids/classes/VideoInfo.md)\> + +Defined in: [src/core/clients/Kids.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Kids.ts#L22) + +#### Parameters + +##### video\_id + +`string` + +##### options? + +`Omit`\<[`GetVideoInfoOptions`](../../Types/interfaces/GetVideoInfoOptions.md), `"client"`\> + +#### Returns + +`Promise`\<[`VideoInfo`](../../YTKids/classes/VideoInfo.md)\> + +*** + +### search() + +> **search**(`query`): `Promise`\<[`Search`](../../YTKids/classes/Search.md)\> + +Defined in: [src/core/clients/Kids.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Kids.ts#L16) + +#### Parameters + +##### query + +`string` + +#### Returns + +`Promise`\<[`Search`](../../YTKids/classes/Search.md)\> diff --git a/docs/api/youtubei.js/namespaces/Clients/classes/Music.md b/docs/api/youtubei.js/namespaces/Clients/classes/Music.md new file mode 100644 index 00000000..d3901ce2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Clients/classes/Music.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [Clients](../README.md) / Music + +# Class: Music + +Defined in: [src/core/clients/Music.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L33) + +## Constructors + +### Constructor + +> **new Music**(`session`): `Music` + +Defined in: [src/core/clients/Music.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L37) + +#### Parameters + +##### session + +[`Session`](../../../../classes/Session.md) + +#### Returns + +`Music` + +## Methods + +### getAlbum() + +> **getAlbum**(`album_id`): `Promise`\<[`Album`](../../YTMusic/classes/Album.md)\> + +Defined in: [src/core/clients/Music.ts:186](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L186) + +#### Parameters + +##### album\_id + +`string` + +#### Returns + +`Promise`\<[`Album`](../../YTMusic/classes/Album.md)\> + +*** + +### getArtist() + +> **getArtist**(`artist_id`): `Promise`\<[`Artist`](../../YTMusic/classes/Artist.md)\> + +Defined in: [src/core/clients/Music.ts:176](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L176) + +#### Parameters + +##### artist\_id + +`string` + +#### Returns + +`Promise`\<[`Artist`](../../YTMusic/classes/Artist.md)\> + +*** + +### getExplore() + +> **getExplore**(): `Promise`\<[`Explore`](../../YTMusic/classes/Explore.md)\> + +Defined in: [src/core/clients/Music.ts:163](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L163) + +#### Returns + +`Promise`\<[`Explore`](../../YTMusic/classes/Explore.md)\> + +*** + +### getHomeFeed() + +> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../../YTMusic/classes/HomeFeed.md)\> + +Defined in: [src/core/clients/Music.ts:157](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L157) + +#### Returns + +`Promise`\<[`HomeFeed`](../../YTMusic/classes/HomeFeed.md)\> + +*** + +### getInfo() + +> **getInfo**(`target`, `options?`): `Promise`\<[`TrackInfo`](../../YTMusic/classes/TrackInfo.md)\> + +Defined in: [src/core/clients/Music.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L47) + +Retrieves track info. Passing a list item of type MusicTwoRowItem automatically starts a radio. + +#### Parameters + +##### target + +Video id or a list item. + +`string` | [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) | [`MusicResponsiveListItem`](../../YTNodes/classes/MusicResponsiveListItem.md) | [`MusicTwoRowItem`](../../YTNodes/classes/MusicTwoRowItem.md) + +##### options? + +`Omit`\<[`GetVideoInfoOptions`](../../Types/interfaces/GetVideoInfoOptions.md), `"client"`\> + +Options for fetching video info. + +#### Returns + +`Promise`\<[`TrackInfo`](../../YTMusic/classes/TrackInfo.md)\> + +*** + +### getLibrary() + +> **getLibrary**(): `Promise`\<[`Library`](../../YTMusic/classes/Library.md)\> + +Defined in: [src/core/clients/Music.ts:170](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L170) + +#### Returns + +`Promise`\<[`Library`](../../YTMusic/classes/Library.md)\> + +*** + +### getLyrics() + +> **getLyrics**(`video_id`): `Promise`\<[`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md) \| `undefined`\> + +Defined in: [src/core/clients/Music.ts:267](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L267) + +#### Parameters + +##### video\_id + +`string` + +#### Returns + +`Promise`\<[`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md) \| `undefined`\> + +*** + +### getPlaylist() + +> **getPlaylist**(`playlist_id`): `Promise`\<[`Playlist`](../../YTMusic/classes/Playlist.md)\> + +Defined in: [src/core/clients/Music.ts:196](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L196) + +#### Parameters + +##### playlist\_id + +`string` + +#### Returns + +`Promise`\<[`Playlist`](../../YTMusic/classes/Playlist.md)\> + +*** + +### getRecap() + +> **getRecap**(): `Promise`\<[`Recap`](../../YTMusic/classes/Recap.md)\> + +Defined in: [src/core/clients/Music.ts:293](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L293) + +#### Returns + +`Promise`\<[`Recap`](../../YTMusic/classes/Recap.md)\> + +*** + +### getRelated() + +> **getRelated**(`video_id`): `Promise`\<[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`Message`](../../YTNodes/classes/Message.md)\> + +Defined in: [src/core/clients/Music.ts:246](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L246) + +#### Parameters + +##### video\_id + +`string` + +#### Returns + +`Promise`\<[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`Message`](../../YTNodes/classes/Message.md)\> + +*** + +### getSearchSuggestions() + +> **getSearchSuggestions**(`input`): `Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SearchSuggestionsSection`](../../YTNodes/classes/SearchSuggestionsSection.md)\>\> + +Defined in: [src/core/clients/Music.ts:299](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L299) + +#### Parameters + +##### input + +`string` + +#### Returns + +`Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SearchSuggestionsSection`](../../YTNodes/classes/SearchSuggestionsSection.md)\>\> + +*** + +### getUpNext() + +> **getUpNext**(`video_id`, `automix`): `Promise`\<[`PlaylistPanel`](../../YTNodes/classes/PlaylistPanel.md)\> + +Defined in: [src/core/clients/Music.ts:206](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L206) + +#### Parameters + +##### video\_id + +`string` + +##### automix + +`boolean` = `true` + +#### Returns + +`Promise`\<[`PlaylistPanel`](../../YTNodes/classes/PlaylistPanel.md)\> + +*** + +### search() + +> **search**(`query`, `filters`): `Promise`\<[`Search`](../../YTMusic/classes/Search.md)\> + +Defined in: [src/core/clients/Music.ts:135](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Music.ts#L135) + +#### Parameters + +##### query + +`string` + +##### filters + +[`MusicSearchFilters`](../../Types/type-aliases/MusicSearchFilters.md) = `{}` + +#### Returns + +`Promise`\<[`Search`](../../YTMusic/classes/Search.md)\> diff --git a/docs/api/youtubei.js/namespaces/Clients/classes/Studio.md b/docs/api/youtubei.js/namespaces/Clients/classes/Studio.md new file mode 100644 index 00000000..81e10040 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Clients/classes/Studio.md @@ -0,0 +1,95 @@ +[youtubei.js](../../../../README.md) / [Clients](../README.md) / Studio + +# Class: Studio + +Defined in: [src/core/clients/Studio.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Studio.ts#L22) + +## Constructors + +### Constructor + +> **new Studio**(`session`): `Studio` + +Defined in: [src/core/clients/Studio.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Studio.ts#L25) + +#### Parameters + +##### session + +[`Session`](../../../../classes/Session.md) + +#### Returns + +`Studio` + +## Methods + +### updateVideoMetadata() + +> **updateVideoMetadata**(`video_id`, `metadata`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/clients/Studio.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Studio.ts#L47) + +Updates the metadata of a video. + +#### Parameters + +##### video\_id + +`string` + +##### metadata + +[`UpdateVideoMetadataOptions`](../../Types/type-aliases/UpdateVideoMetadataOptions.md) + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +#### Example + +```ts +const videoId = 'abcdefg'; +const thumbnail = fs.readFileSync('./my_awesome_thumbnail.jpg'); + +const response = await yt.studio.updateVideoMetadata(videoId, { + tags: [ 'astronomy', 'NASA', 'APOD' ], + title: 'Artemis Mission', + description: 'A nicely written description...', + category: 27, + license: 'creative_commons', + thumbnail, + // ... +}); +``` + +*** + +### upload() + +> **upload**(`file`, `metadata`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/clients/Studio.ts:150](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/clients/Studio.ts#L150) + +Uploads a video to YouTube. + +#### Parameters + +##### file + +`BodyInit` + +##### metadata + +[`UploadedVideoMetadataOptions`](../../Types/type-aliases/UploadedVideoMetadataOptions.md) = `{}` + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +#### Example + +```ts +const file = fs.readFileSync('./my_awesome_video.mp4'); +const response = await yt.studio.upload(file.buffer, { title: 'Wow!' }); +``` diff --git a/docs/api/namespaces/Constants/README.md b/docs/api/youtubei.js/namespaces/Constants/README.md similarity index 83% rename from docs/api/namespaces/Constants/README.md rename to docs/api/youtubei.js/namespaces/Constants/README.md index 64541714..5fe1abe5 100644 --- a/docs/api/namespaces/Constants/README.md +++ b/docs/api/youtubei.js/namespaces/Constants/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / Constants +[youtubei.js](../../../README.md) / Constants # Constants -## Index - -### Variables +## Variables - [CLIENT\_NAME\_IDS](variables/CLIENT_NAME_IDS.md) - [CLIENTS](variables/CLIENTS.md) diff --git a/docs/api/namespaces/Constants/variables/CLIENTS.md b/docs/api/youtubei.js/namespaces/Constants/variables/CLIENTS.md similarity index 78% rename from docs/api/namespaces/Constants/variables/CLIENTS.md rename to docs/api/youtubei.js/namespaces/Constants/variables/CLIENTS.md index dd2d490b..a0ba003c 100644 --- a/docs/api/namespaces/Constants/variables/CLIENTS.md +++ b/docs/api/youtubei.js/namespaces/Constants/variables/CLIENTS.md @@ -1,28 +1,30 @@ -[youtubei.js](../../../README.md) / [Constants](../README.md) / CLIENTS +[youtubei.js](../../../../README.md) / [Constants](../README.md) / CLIENTS # Variable: CLIENTS > `const` **CLIENTS**: `object` -## Type declaration +Defined in: [src/utils/Constants.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Constants.ts#L25) + +## Type Declaration ### ANDROID > `readonly` **ANDROID**: `object` -### ANDROID.NAME +#### ANDROID.NAME > `readonly` **NAME**: `"ANDROID"` = `'ANDROID'` -### ANDROID.SDK\_VERSION +#### ANDROID.SDK\_VERSION > `readonly` **SDK\_VERSION**: `33` = `33` -### ANDROID.USER\_AGENT +#### ANDROID.USER\_AGENT > `readonly` **USER\_AGENT**: `"com.google.android.youtube/19.35.36(Linux; U; Android 13; en_US; SM-S908E Build/TP1A.220624.014) gzip"` = `'com.google.android.youtube/19.35.36(Linux; U; Android 13; en_US; SM-S908E Build/TP1A.220624.014) gzip'` -### ANDROID.VERSION +#### ANDROID.VERSION > `readonly` **VERSION**: `"19.35.36"` = `'19.35.36'` @@ -30,27 +32,27 @@ > `readonly` **IOS**: `object` -### IOS.DEVICE\_MODEL +#### IOS.DEVICE\_MODEL > `readonly` **DEVICE\_MODEL**: `"iPhone10,4"` = `'iPhone10,4'` -### IOS.NAME +#### IOS.NAME > `readonly` **NAME**: `"iOS"` = `'iOS'` -### IOS.OS\_NAME +#### IOS.OS\_NAME > `readonly` **OS\_NAME**: `"iOS"` = `'iOS'` -### IOS.OS\_VERSION +#### IOS.OS\_VERSION > `readonly` **OS\_VERSION**: `"16.7.7.20H330"` = `'16.7.7.20H330'` -### IOS.USER\_AGENT +#### IOS.USER\_AGENT > `readonly` **USER\_AGENT**: `"com.google.ios.youtube/20.11.6 (iPhone10,4; U; CPU iOS 16_7_7 like Mac OS X)"` = `'com.google.ios.youtube/20.11.6 (iPhone10,4; U; CPU iOS 16_7_7 like Mac OS X)'` -### IOS.VERSION +#### IOS.VERSION > `readonly` **VERSION**: `"20.11.6"` = `'20.11.6'` @@ -58,15 +60,15 @@ > `readonly` **MWEB**: `object` -### MWEB.API\_VERSION +#### MWEB.API\_VERSION > `readonly` **API\_VERSION**: `"v1"` = `'v1'` -### MWEB.NAME +#### MWEB.NAME > `readonly` **NAME**: `"MWEB"` = `'MWEB'` -### MWEB.VERSION +#### MWEB.VERSION > `readonly` **VERSION**: `"2.20250224.01.00"` = `'2.20250224.01.00'` @@ -74,15 +76,15 @@ > `readonly` **TV**: `object` -### TV.NAME +#### TV.NAME > `readonly` **NAME**: `"TVHTML5"` = `'TVHTML5'` -### TV.USER\_AGENT +#### TV.USER\_AGENT > `readonly` **USER\_AGENT**: `"Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version"` = `'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version'` -### TV.VERSION +#### TV.VERSION > `readonly` **VERSION**: `"7.20250219.14.00"` = `'7.20250219.14.00'` @@ -90,11 +92,11 @@ > `readonly` **TV\_EMBEDDED**: `object` -### TV\_EMBEDDED.NAME +#### TV\_EMBEDDED.NAME > `readonly` **NAME**: `"TVHTML5_SIMPLY_EMBEDDED_PLAYER"` = `'TVHTML5_SIMPLY_EMBEDDED_PLAYER'` -### TV\_EMBEDDED.VERSION +#### TV\_EMBEDDED.VERSION > `readonly` **VERSION**: `"2.0"` = `'2.0'` @@ -102,11 +104,11 @@ > `readonly` **TV\_SIMPLY**: `object` -### TV\_SIMPLY.NAME +#### TV\_SIMPLY.NAME > `readonly` **NAME**: `"TVHTML5_SIMPLY"` = `'TVHTML5_SIMPLY'` -### TV\_SIMPLY.VERSION +#### TV\_SIMPLY.VERSION > `readonly` **VERSION**: `"1.0"` = `'1.0'` @@ -114,27 +116,27 @@ > `readonly` **WEB**: `object` -### WEB.API\_KEY +#### WEB.API\_KEY > `readonly` **API\_KEY**: `"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"` = `'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8'` -### WEB.API\_VERSION +#### WEB.API\_VERSION > `readonly` **API\_VERSION**: `"v1"` = `'v1'` -### WEB.NAME +#### WEB.NAME > `readonly` **NAME**: `"WEB"` = `'WEB'` -### WEB.STATIC\_VISITOR\_ID +#### WEB.STATIC\_VISITOR\_ID > `readonly` **STATIC\_VISITOR\_ID**: `"6zpwvWUNAco"` = `'6zpwvWUNAco'` -### WEB.SUGG\_EXP\_ID +#### WEB.SUGG\_EXP\_ID > `readonly` **SUGG\_EXP\_ID**: `"ytzpb5_e2,ytpo.bo.lqp.elu=1,ytpo.bo.lqp.ecsc=1,ytpo.bo.lqp.mcsc=3,ytpo.bo.lqp.mec=1,ytpo.bo.lqp.rw=0.8,ytpo.bo.lqp.fw=0.2,ytpo.bo.lqp.szp=1,ytpo.bo.lqp.mz=3,ytpo.bo.lqp.al=en_us,ytpo.bo.lqp.zrm=1,ytpo.bo.lqp.er=1,ytpo.bo.ro.erl=1,ytpo.bo.ro.mlus=3,ytpo.bo.ro.erls=3,ytpo.bo.qfo.mlus=3,ytzprp.ppp.e=1,ytzprp.ppp.st=772,ytzprp.ppp.p=5"` = `'ytzpb5_e2,ytpo.bo.lqp.elu=1,ytpo.bo.lqp.ecsc=1,ytpo.bo.lqp.mcsc=3,ytpo.bo.lqp.mec=1,ytpo.bo.lqp.rw=0.8,ytpo.bo.lqp.fw=0.2,ytpo.bo.lqp.szp=1,ytpo.bo.lqp.mz=3,ytpo.bo.lqp.al=en_us,ytpo.bo.lqp.zrm=1,ytpo.bo.lqp.er=1,ytpo.bo.ro.erl=1,ytpo.bo.ro.mlus=3,ytpo.bo.ro.erls=3,ytpo.bo.qfo.mlus=3,ytzprp.ppp.e=1,ytzprp.ppp.st=772,ytzprp.ppp.p=5'` -### WEB.VERSION +#### WEB.VERSION > `readonly` **VERSION**: `"2.20250222.10.00"` = `'2.20250222.10.00'` @@ -142,23 +144,23 @@ > `readonly` **WEB\_CREATOR**: `object` -### WEB\_CREATOR.API\_KEY +#### WEB\_CREATOR.API\_KEY > `readonly` **API\_KEY**: `"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"` = `'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8'` -### WEB\_CREATOR.API\_VERSION +#### WEB\_CREATOR.API\_VERSION > `readonly` **API\_VERSION**: `"v1"` = `'v1'` -### WEB\_CREATOR.NAME +#### WEB\_CREATOR.NAME > `readonly` **NAME**: `"WEB_CREATOR"` = `'WEB_CREATOR'` -### WEB\_CREATOR.STATIC\_VISITOR\_ID +#### WEB\_CREATOR.STATIC\_VISITOR\_ID > `readonly` **STATIC\_VISITOR\_ID**: `"6zpwvWUNAco"` = `'6zpwvWUNAco'` -### WEB\_CREATOR.VERSION +#### WEB\_CREATOR.VERSION > `readonly` **VERSION**: `"1.20241203.01.00"` = `'1.20241203.01.00'` @@ -166,23 +168,23 @@ > `readonly` **WEB\_EMBEDDED**: `object` -### WEB\_EMBEDDED.API\_KEY +#### WEB\_EMBEDDED.API\_KEY > `readonly` **API\_KEY**: `"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"` = `'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8'` -### WEB\_EMBEDDED.API\_VERSION +#### WEB\_EMBEDDED.API\_VERSION > `readonly` **API\_VERSION**: `"v1"` = `'v1'` -### WEB\_EMBEDDED.NAME +#### WEB\_EMBEDDED.NAME > `readonly` **NAME**: `"WEB_EMBEDDED_PLAYER"` = `'WEB_EMBEDDED_PLAYER'` -### WEB\_EMBEDDED.STATIC\_VISITOR\_ID +#### WEB\_EMBEDDED.STATIC\_VISITOR\_ID > `readonly` **STATIC\_VISITOR\_ID**: `"6zpwvWUNAco"` = `'6zpwvWUNAco'` -### WEB\_EMBEDDED.VERSION +#### WEB\_EMBEDDED.VERSION > `readonly` **VERSION**: `"1.20250219.01.00"` = `'1.20250219.01.00'` @@ -190,11 +192,11 @@ > `readonly` **WEB\_KIDS**: `object` -### WEB\_KIDS.NAME +#### WEB\_KIDS.NAME > `readonly` **NAME**: `"WEB_KIDS"` = `'WEB_KIDS'` -### WEB\_KIDS.VERSION +#### WEB\_KIDS.VERSION > `readonly` **VERSION**: `"2.20250221.11.00"` = `'2.20250221.11.00'` @@ -202,11 +204,11 @@ > `readonly` **YTMUSIC**: `object` -### YTMUSIC.NAME +#### YTMUSIC.NAME > `readonly` **NAME**: `"WEB_REMIX"` = `'WEB_REMIX'` -### YTMUSIC.VERSION +#### YTMUSIC.VERSION > `readonly` **VERSION**: `"1.20250219.01.00"` = `'1.20250219.01.00'` @@ -214,11 +216,11 @@ > `readonly` **YTMUSIC\_ANDROID**: `object` -### YTMUSIC\_ANDROID.NAME +#### YTMUSIC\_ANDROID.NAME > `readonly` **NAME**: `"ANDROID_MUSIC"` = `'ANDROID_MUSIC'` -### YTMUSIC\_ANDROID.VERSION +#### YTMUSIC\_ANDROID.VERSION > `readonly` **VERSION**: `"5.34.51"` = `'5.34.51'` @@ -226,14 +228,10 @@ > `readonly` **YTSTUDIO\_ANDROID**: `object` -### YTSTUDIO\_ANDROID.NAME +#### YTSTUDIO\_ANDROID.NAME > `readonly` **NAME**: `"ANDROID_CREATOR"` = `'ANDROID_CREATOR'` -### YTSTUDIO\_ANDROID.VERSION +#### YTSTUDIO\_ANDROID.VERSION > `readonly` **VERSION**: `"22.43.101"` = `'22.43.101'` - -## Defined in - -[src/utils/Constants.ts:25](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Constants.ts#L25) diff --git a/docs/api/namespaces/Constants/variables/CLIENT_NAME_IDS.md b/docs/api/youtubei.js/namespaces/Constants/variables/CLIENT_NAME_IDS.md similarity index 79% rename from docs/api/namespaces/Constants/variables/CLIENT_NAME_IDS.md rename to docs/api/youtubei.js/namespaces/Constants/variables/CLIENT_NAME_IDS.md index ca97ed2b..a13a44d1 100644 --- a/docs/api/namespaces/Constants/variables/CLIENT_NAME_IDS.md +++ b/docs/api/youtubei.js/namespaces/Constants/variables/CLIENT_NAME_IDS.md @@ -1,12 +1,14 @@ -[youtubei.js](../../../README.md) / [Constants](../README.md) / CLIENT\_NAME\_IDS +[youtubei.js](../../../../README.md) / [Constants](../README.md) / CLIENT\_NAME\_IDS # Variable: CLIENT\_NAME\_IDS > `const` **CLIENT\_NAME\_IDS**: `object` +Defined in: [src/utils/Constants.ts:100](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Constants.ts#L100) + The keys correspond to the `NAME` fields in [`CLIENTS`](CLIENTS.md) constant -## Type declaration +## Type Declaration ### ANDROID @@ -59,7 +61,3 @@ The keys correspond to the `NAME` fields in [`CLIENTS`](CLIENTS.md) constant ### WEB\_REMIX > `readonly` **WEB\_REMIX**: `"67"` = `'67'` - -## Defined in - -[src/utils/Constants.ts:100](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Constants.ts#L100) diff --git a/docs/api/namespaces/Constants/variables/INNERTUBE_HEADERS_BASE.md b/docs/api/youtubei.js/namespaces/Constants/variables/INNERTUBE_HEADERS_BASE.md similarity index 55% rename from docs/api/namespaces/Constants/variables/INNERTUBE_HEADERS_BASE.md rename to docs/api/youtubei.js/namespaces/Constants/variables/INNERTUBE_HEADERS_BASE.md index 935931b1..c6322c68 100644 --- a/docs/api/namespaces/Constants/variables/INNERTUBE_HEADERS_BASE.md +++ b/docs/api/youtubei.js/namespaces/Constants/variables/INNERTUBE_HEADERS_BASE.md @@ -1,10 +1,12 @@ -[youtubei.js](../../../README.md) / [Constants](../README.md) / INNERTUBE\_HEADERS\_BASE +[youtubei.js](../../../../README.md) / [Constants](../README.md) / INNERTUBE\_HEADERS\_BASE # Variable: INNERTUBE\_HEADERS\_BASE > `const` **INNERTUBE\_HEADERS\_BASE**: `object` -## Type declaration +Defined in: [src/utils/Constants.ts:121](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Constants.ts#L121) + +## Type Declaration ### accept @@ -17,7 +19,3 @@ ### content-type > `readonly` **content-type**: `"application/json"` = `'application/json'` - -## Defined in - -[src/utils/Constants.ts:121](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Constants.ts#L121) diff --git a/docs/api/youtubei.js/namespaces/Constants/variables/OAUTH.md b/docs/api/youtubei.js/namespaces/Constants/variables/OAUTH.md new file mode 100644 index 00000000..c2d141f2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Constants/variables/OAUTH.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Constants](../README.md) / OAUTH + +# Variable: OAUTH + +> `const` **OAUTH**: `object` + +Defined in: [src/utils/Constants.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Constants.ts#L19) + +## Type Declaration + +### REGEX + +> `readonly` **REGEX**: `object` + +#### REGEX.CLIENT\_IDENTITY + +> `readonly` **CLIENT\_IDENTITY**: `RegExp` + +#### REGEX.TV\_SCRIPT + +> `readonly` **TV\_SCRIPT**: `RegExp` diff --git a/docs/api/namespaces/Constants/variables/STREAM_HEADERS.md b/docs/api/youtubei.js/namespaces/Constants/variables/STREAM_HEADERS.md similarity index 59% rename from docs/api/namespaces/Constants/variables/STREAM_HEADERS.md rename to docs/api/youtubei.js/namespaces/Constants/variables/STREAM_HEADERS.md index fba72980..b4f47d87 100644 --- a/docs/api/namespaces/Constants/variables/STREAM_HEADERS.md +++ b/docs/api/youtubei.js/namespaces/Constants/variables/STREAM_HEADERS.md @@ -1,10 +1,12 @@ -[youtubei.js](../../../README.md) / [Constants](../README.md) / STREAM\_HEADERS +[youtubei.js](../../../../README.md) / [Constants](../README.md) / STREAM\_HEADERS # Variable: STREAM\_HEADERS > `const` **STREAM\_HEADERS**: `object` -## Type declaration +Defined in: [src/utils/Constants.ts:115](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Constants.ts#L115) + +## Type Declaration ### accept @@ -21,7 +23,3 @@ ### referer > `readonly` **referer**: `"https://www.youtube.com"` = `'https://www.youtube.com'` - -## Defined in - -[src/utils/Constants.ts:115](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Constants.ts#L115) diff --git a/docs/api/youtubei.js/namespaces/Constants/variables/SUPPORTED_CLIENTS.md b/docs/api/youtubei.js/namespaces/Constants/variables/SUPPORTED_CLIENTS.md new file mode 100644 index 00000000..9c09a7f6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Constants/variables/SUPPORTED_CLIENTS.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Constants](../README.md) / SUPPORTED\_CLIENTS + +# Variable: SUPPORTED\_CLIENTS + +> `const` **SUPPORTED\_CLIENTS**: `string`[] + +Defined in: [src/utils/Constants.ts:127](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Constants.ts#L127) diff --git a/docs/api/namespaces/Constants/variables/URLS.md b/docs/api/youtubei.js/namespaces/Constants/variables/URLS.md similarity index 82% rename from docs/api/namespaces/Constants/variables/URLS.md rename to docs/api/youtubei.js/namespaces/Constants/variables/URLS.md index 7440484c..0d53eec9 100644 --- a/docs/api/namespaces/Constants/variables/URLS.md +++ b/docs/api/youtubei.js/namespaces/Constants/variables/URLS.md @@ -1,44 +1,46 @@ -[youtubei.js](../../../README.md) / [Constants](../README.md) / URLS +[youtubei.js](../../../../README.md) / [Constants](../README.md) / URLS # Variable: URLS > `const` **URLS**: `object` -## Type declaration +Defined in: [src/utils/Constants.ts:2](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Constants.ts#L2) + +## Type Declaration ### API > `readonly` **API**: `object` -### API.BASE +#### API.BASE > `readonly` **BASE**: `"https://youtubei.googleapis.com"` = `'https://youtubei.googleapis.com'` -### API.CAMI +#### API.CAMI > `readonly` **CAMI**: `"http://cami-youtubei.sandbox.googleapis.com/youtubei/"` = `'http://cami-youtubei.sandbox.googleapis.com/youtubei/'` -### API.PRODUCTION\_1 +#### API.PRODUCTION\_1 > `readonly` **PRODUCTION\_1**: `"https://www.youtube.com/youtubei/"` = `'https://www.youtube.com/youtubei/'` -### API.PRODUCTION\_2 +#### API.PRODUCTION\_2 > `readonly` **PRODUCTION\_2**: `"https://youtubei.googleapis.com/youtubei/"` = `'https://youtubei.googleapis.com/youtubei/'` -### API.RELEASE +#### API.RELEASE > `readonly` **RELEASE**: `"https://release-youtubei.sandbox.googleapis.com/youtubei/"` = `'https://release-youtubei.sandbox.googleapis.com/youtubei/'` -### API.STAGING +#### API.STAGING > `readonly` **STAGING**: `"https://green-youtubei.sandbox.googleapis.com/youtubei/"` = `'https://green-youtubei.sandbox.googleapis.com/youtubei/'` -### API.TEST +#### API.TEST > `readonly` **TEST**: `"https://test-youtubei.sandbox.googleapis.com/youtubei/"` = `'https://test-youtubei.sandbox.googleapis.com/youtubei/'` -### API.UYTFE +#### API.UYTFE > `readonly` **UYTFE**: `"https://uytfe.sandbox.google.com/youtubei/"` = `'https://uytfe.sandbox.google.com/youtubei/'` @@ -61,7 +63,3 @@ ### YT\_UPLOAD > `readonly` **YT\_UPLOAD**: `"https://upload.youtube.com/"` = `'https://upload.youtube.com/'` - -## Defined in - -[src/utils/Constants.ts:2](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Constants.ts#L2) diff --git a/docs/api/namespaces/FormatUtils/README.md b/docs/api/youtubei.js/namespaces/FormatUtils/README.md similarity index 65% rename from docs/api/namespaces/FormatUtils/README.md rename to docs/api/youtubei.js/namespaces/FormatUtils/README.md index b80f428a..3715016c 100644 --- a/docs/api/namespaces/FormatUtils/README.md +++ b/docs/api/youtubei.js/namespaces/FormatUtils/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / FormatUtils +[youtubei.js](../../../README.md) / FormatUtils # FormatUtils -## Index - -### Functions +## Functions - [chooseFormat](functions/chooseFormat.md) - [download](functions/download.md) diff --git a/docs/api/youtubei.js/namespaces/FormatUtils/functions/chooseFormat.md b/docs/api/youtubei.js/namespaces/FormatUtils/functions/chooseFormat.md new file mode 100644 index 00000000..e2d1db6c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/FormatUtils/functions/chooseFormat.md @@ -0,0 +1,27 @@ +[youtubei.js](../../../../README.md) / [FormatUtils](../README.md) / chooseFormat + +# Function: chooseFormat() + +> **chooseFormat**(`options`, `streaming_data?`): [`Format`](../../Misc/classes/Format.md) + +Defined in: [src/utils/FormatUtils.ts:138](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/FormatUtils.ts#L138) + +Selects the format that best matches the given options. + +## Parameters + +### options + +[`FormatOptions`](../../Types/interfaces/FormatOptions.md) + +Options + +### streaming\_data? + +[`IStreamingData`](../../../../interfaces/IStreamingData.md) + +Streaming data + +## Returns + +[`Format`](../../Misc/classes/Format.md) diff --git a/docs/api/youtubei.js/namespaces/FormatUtils/functions/download.md b/docs/api/youtubei.js/namespaces/FormatUtils/functions/download.md new file mode 100644 index 00000000..88a93c78 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/FormatUtils/functions/download.md @@ -0,0 +1,37 @@ +[youtubei.js](../../../../README.md) / [FormatUtils](../README.md) / download + +# Function: download() + +> **download**(`options`, `actions`, `playability_status?`, `streaming_data?`, `player?`, `cpn?`): `Promise`\<`ReadableStream`\<`Uint8Array`\>\> + +Defined in: [src/utils/FormatUtils.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/FormatUtils.ts#L10) + +## Parameters + +### options + +[`DownloadOptions`](../../Types/interfaces/DownloadOptions.md) + +### actions + +[`Actions`](../../../../classes/Actions.md) + +### playability\_status? + +[`IPlayabilityStatus`](../../../../interfaces/IPlayabilityStatus.md) + +### streaming\_data? + +[`IStreamingData`](../../../../interfaces/IStreamingData.md) + +### player? + +[`Player`](../../../../classes/Player.md) + +### cpn? + +`string` + +## Returns + +`Promise`\<`ReadableStream`\<`Uint8Array`\>\> diff --git a/docs/api/youtubei.js/namespaces/FormatUtils/functions/toDash.md b/docs/api/youtubei.js/namespaces/FormatUtils/functions/toDash.md new file mode 100644 index 00000000..b41d277c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/FormatUtils/functions/toDash.md @@ -0,0 +1,53 @@ +[youtubei.js](../../../../README.md) / [FormatUtils](../README.md) / toDash + +# Function: toDash() + +> **toDash**(`streaming_data?`, `is_post_live_dvr?`, `url_transformer?`, `format_filter?`, `cpn?`, `player?`, `actions?`, `storyboards?`, `caption_tracks?`, `options?`): `Promise`\<`string`\> + +Defined in: [src/utils/DashManifest.tsx:290](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/DashManifest.tsx#L290) + +## Parameters + +### streaming\_data? + +[`IStreamingData`](../../../../interfaces/IStreamingData.md) + +### is\_post\_live\_dvr? + +`boolean` = `false` + +### url\_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) = `...` + +### format\_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) + +### cpn? + +`string` + +### player? + +[`Player`](../../../../classes/Player.md) + +### actions? + +[`Actions`](../../../../classes/Actions.md) + +### storyboards? + +[`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md) | [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md) + +### caption\_tracks? + +`CaptionTrackData`[] + +### options? + +`StreamingInfoOptions` + +## Returns + +`Promise`\<`string`\> diff --git a/docs/api/namespaces/Generator/README.md b/docs/api/youtubei.js/namespaces/Generator/README.md similarity index 91% rename from docs/api/namespaces/Generator/README.md rename to docs/api/youtubei.js/namespaces/Generator/README.md index 4e1b4bef..be62ef68 100644 --- a/docs/api/namespaces/Generator/README.md +++ b/docs/api/youtubei.js/namespaces/Generator/README.md @@ -1,23 +1,21 @@ -[youtubei.js](../../README.md) / Generator +[youtubei.js](../../../README.md) / Generator # Generator -## Index - -### Interfaces +## Interfaces - [ObjectInferenceType](interfaces/ObjectInferenceType.md) - [PrimitiveInferenceType](interfaces/PrimitiveInferenceType.md) - [RendererInferenceType](interfaces/RendererInferenceType.md) -### Type Aliases +## Type Aliases - [ArrayInferenceType](type-aliases/ArrayInferenceType.md) - [InferenceType](type-aliases/InferenceType.md) - [KeyInfo](type-aliases/KeyInfo.md) - [MiscInferenceType](type-aliases/MiscInferenceType.md) -### Functions +## Functions - [camelToSnake](functions/camelToSnake.md) - [createRuntimeClass](functions/createRuntimeClass.md) diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/camelToSnake.md b/docs/api/youtubei.js/namespaces/Generator/functions/camelToSnake.md new file mode 100644 index 00000000..1cc6801e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/camelToSnake.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / camelToSnake + +# Function: camelToSnake() + +> **camelToSnake**(`str`): `string` + +Defined in: [src/parser/generator.ts:82](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L82) + +## Parameters + +### str + +`string` + +## Returns + +`string` diff --git a/docs/api/namespaces/Generator/functions/createRuntimeClass.md b/docs/api/youtubei.js/namespaces/Generator/functions/createRuntimeClass.md similarity index 52% rename from docs/api/namespaces/Generator/functions/createRuntimeClass.md rename to docs/api/youtubei.js/namespaces/Generator/functions/createRuntimeClass.md index 3b8a2bce..70ee3ddb 100644 --- a/docs/api/namespaces/Generator/functions/createRuntimeClass.md +++ b/docs/api/youtubei.js/namespaces/Generator/functions/createRuntimeClass.md @@ -1,22 +1,30 @@ -[youtubei.js](../../../README.md) / [Generator](../README.md) / createRuntimeClass +[youtubei.js](../../../../README.md) / [Generator](../README.md) / createRuntimeClass # Function: createRuntimeClass() > **createRuntimeClass**(`classname`, `key_info`, `logger`): [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md) +Defined in: [src/parser/generator.ts:411](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L411) + Given a classname and its resolved key info, create a new class ## Parameters -• **classname**: `string` +### classname + +`string` The name of the class -• **key\_info**: [`KeyInfo`](../type-aliases/KeyInfo.md) +### key\_info + +[`KeyInfo`](../type-aliases/KeyInfo.md) The resolved key info -• **logger**: [`ParserErrorHandler`](../../Parser/type-aliases/ParserErrorHandler.md) +### logger + +[`ParserErrorHandler`](../../Parser/type-aliases/ParserErrorHandler.md) The logger to log errors to @@ -25,7 +33,3 @@ The logger to log errors to [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md) Class based on the key info extending YTNode - -## Defined in - -[src/parser/generator.ts:411](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/generator.ts#L411) diff --git a/docs/api/namespaces/Generator/functions/generateRuntimeClass.md b/docs/api/youtubei.js/namespaces/Generator/functions/generateRuntimeClass.md similarity index 60% rename from docs/api/namespaces/Generator/functions/generateRuntimeClass.md rename to docs/api/youtubei.js/namespaces/Generator/functions/generateRuntimeClass.md index 890f875b..dc9df47b 100644 --- a/docs/api/namespaces/Generator/functions/generateRuntimeClass.md +++ b/docs/api/youtubei.js/namespaces/Generator/functions/generateRuntimeClass.md @@ -1,22 +1,30 @@ -[youtubei.js](../../../README.md) / [Generator](../README.md) / generateRuntimeClass +[youtubei.js](../../../../README.md) / [Generator](../README.md) / generateRuntimeClass # Function: generateRuntimeClass() > **generateRuntimeClass**(`classname`, `classdata`, `logger`): [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/generator.ts:474](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L474) + Given example data for a class, introspect, implement dependencies, and create a new class ## Parameters -• **classname**: `string` +### classname + +`string` The name of the class -• **classdata**: `unknown` +### classdata + +`unknown` The example of the class -• **logger**: [`ParserErrorHandler`](../../Parser/type-aliases/ParserErrorHandler.md) +### logger + +[`ParserErrorHandler`](../../Parser/type-aliases/ParserErrorHandler.md) The logger to log errors to @@ -25,7 +33,3 @@ The logger to log errors to [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> Class based on the example classdata extending YTNode - -## Defined in - -[src/parser/generator.ts:474](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/generator.ts#L474) diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/generateTypescriptClass.md b/docs/api/youtubei.js/namespaces/Generator/functions/generateTypescriptClass.md new file mode 100644 index 00000000..1039a18b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/generateTypescriptClass.md @@ -0,0 +1,29 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / generateTypescriptClass + +# Function: generateTypescriptClass() + +> **generateTypescriptClass**(`classname`, `key_info`): `string` + +Defined in: [src/parser/generator.ts:495](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L495) + +Generate a typescript class based on the key info + +## Parameters + +### classname + +`string` + +The name of the class + +### key\_info + +[`KeyInfo`](../type-aliases/KeyInfo.md) + +The key info, as returned by [introspect](introspect.md) + +## Returns + +`string` + +Typescript class file diff --git a/docs/api/namespaces/Generator/functions/inferType.md b/docs/api/youtubei.js/namespaces/Generator/functions/inferType.md similarity index 52% rename from docs/api/namespaces/Generator/functions/inferType.md rename to docs/api/youtubei.js/namespaces/Generator/functions/inferType.md index a5bcd951..94dd6af3 100644 --- a/docs/api/namespaces/Generator/functions/inferType.md +++ b/docs/api/youtubei.js/namespaces/Generator/functions/inferType.md @@ -1,18 +1,24 @@ -[youtubei.js](../../../README.md) / [Generator](../README.md) / inferType +[youtubei.js](../../../../README.md) / [Generator](../README.md) / inferType # Function: inferType() > **inferType**(`key`, `value`): [`InferenceType`](../type-aliases/InferenceType.md) +Defined in: [src/parser/generator.ts:92](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L92) + Infer the type of key given its value ## Parameters -• **key**: `string` +### key + +`string` The key to infer the type of -• **value**: `unknown` +### value + +`unknown` The value of the key @@ -21,7 +27,3 @@ The value of the key [`InferenceType`](../type-aliases/InferenceType.md) The inferred type - -## Defined in - -[src/parser/generator.ts:92](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/generator.ts#L92) diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/introspect.md b/docs/api/youtubei.js/namespaces/Generator/functions/introspect.md new file mode 100644 index 00000000..f840208b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/introspect.md @@ -0,0 +1,31 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / introspect + +# Function: introspect() + +> **introspect**(`classdata`): `object` + +Defined in: [src/parser/generator.ts:376](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L376) + +Introspect an example of a class in order to determine its key info and dependencies + +## Parameters + +### classdata + +`unknown` + +The example of the class + +## Returns + +`object` + +The key info and any unimplemented dependencies + +### key\_info + +> **key\_info**: readonly \[`string`, [`InferenceType`](../type-aliases/InferenceType.md)\][] + +### unimplemented\_dependencies + +> **unimplemented\_dependencies**: \[`string`, `any`\][] diff --git a/docs/api/namespaces/Generator/functions/isArrayType.md b/docs/api/youtubei.js/namespaces/Generator/functions/isArrayType.md similarity index 58% rename from docs/api/namespaces/Generator/functions/isArrayType.md rename to docs/api/youtubei.js/namespaces/Generator/functions/isArrayType.md index dd6de96e..6f5b3e2d 100644 --- a/docs/api/namespaces/Generator/functions/isArrayType.md +++ b/docs/api/youtubei.js/namespaces/Generator/functions/isArrayType.md @@ -1,14 +1,18 @@ -[youtubei.js](../../../README.md) / [Generator](../README.md) / isArrayType +[youtubei.js](../../../../README.md) / [Generator](../README.md) / isArrayType # Function: isArrayType() > **isArrayType**(`value`): `false` \| [`ArrayInferenceType`](../type-aliases/ArrayInferenceType.md) +Defined in: [src/parser/generator.ts:222](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L222) + Checks if the given value is an array ## Parameters -• **value**: `unknown` +### value + +`unknown` The value to check @@ -17,7 +21,3 @@ The value to check `false` \| [`ArrayInferenceType`](../type-aliases/ArrayInferenceType.md) If it is an array, return the InferenceType. Otherwise, return false. - -## Defined in - -[src/parser/generator.ts:222](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/generator.ts#L222) diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/isIgnoredKey.md b/docs/api/youtubei.js/namespaces/Generator/functions/isIgnoredKey.md new file mode 100644 index 00000000..d5ef70d5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/isIgnoredKey.md @@ -0,0 +1,23 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / isIgnoredKey + +# Function: isIgnoredKey() + +> **isIgnoredKey**(`key`): `boolean` + +Defined in: [src/parser/generator.ts:400](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L400) + +Is this key ignored by the parser? + +## Parameters + +### key + +The key to check + +`string` | `symbol` + +## Returns + +`boolean` + +Whether or not the key is ignored diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/isMiscType.md b/docs/api/youtubei.js/namespaces/Generator/functions/isMiscType.md new file mode 100644 index 00000000..b8f3044a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/isMiscType.md @@ -0,0 +1,29 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / isMiscType + +# Function: isMiscType() + +> **isMiscType**(`key`, `value`): `false` \| [`MiscInferenceType`](../type-aliases/MiscInferenceType.md) + +Defined in: [src/parser/generator.ts:163](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L163) + +Check if the given value is a misc type. + +## Parameters + +### key + +`string` + +The key of the value + +### value + +`unknown` + +The value to check + +## Returns + +`false` \| [`MiscInferenceType`](../type-aliases/MiscInferenceType.md) + +If it is a misc type, return the InferenceType. Otherwise, return false. diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/isRenderer.md b/docs/api/youtubei.js/namespaces/Generator/functions/isRenderer.md new file mode 100644 index 00000000..81def475 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/isRenderer.md @@ -0,0 +1,23 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / isRenderer + +# Function: isRenderer() + +> **isRenderer**(`value`): `string` \| `false` + +Defined in: [src/parser/generator.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L202) + +Check if the given value is a renderer + +## Parameters + +### value + +`unknown` + +The value to check + +## Returns + +`string` \| `false` + +If it is a renderer, return the class name. Otherwise, return false. diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/isRendererList.md b/docs/api/youtubei.js/namespaces/Generator/functions/isRendererList.md new file mode 100644 index 00000000..613e51e4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/isRendererList.md @@ -0,0 +1,24 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / isRendererList + +# Function: isRendererList() + +> **isRendererList**(`value`): `false` \| \{\[`k`: `string`\]: `any`; \} + +Defined in: [src/parser/generator.ts:141](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L141) + +Checks if the given value is an array of renderers + +## Parameters + +### value + +`unknown` + +The value to check + +## Returns + +`false` \| \{\[`k`: `string`\]: `any`; \} + +If it is a renderer list, return an object with keys being the classnames, and values being an example of that class. +Otherwise, return false. diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/mergeKeyInfo.md b/docs/api/youtubei.js/namespaces/Generator/functions/mergeKeyInfo.md new file mode 100644 index 00000000..2105820d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/mergeKeyInfo.md @@ -0,0 +1,37 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / mergeKeyInfo + +# Function: mergeKeyInfo() + +> **mergeKeyInfo**(`key_info`, `new_key_info`): `object` + +Defined in: [src/parser/generator.ts:734](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L734) + +Merges two sets of key info, resolving any conflicts + +## Parameters + +### key\_info + +[`KeyInfo`](../type-aliases/KeyInfo.md) + +The current key info + +### new\_key\_info + +[`KeyInfo`](../type-aliases/KeyInfo.md) + +The new key info + +## Returns + +`object` + +The merged key info + +### changed\_keys + +> **changed\_keys**: \[`string`, [`InferenceType`](../type-aliases/InferenceType.md)\][] + +### resolved\_key\_info + +> **resolved\_key\_info**: \[`string`, [`InferenceType`](../type-aliases/InferenceType.md)\][] diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/parse.md b/docs/api/youtubei.js/namespaces/Generator/functions/parse.md new file mode 100644 index 00000000..ba0f7cc7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/parse.md @@ -0,0 +1,41 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / parse + +# Function: parse() + +> **parse**(`key`, `inference_type`, `data`, `key_path`): `any` + +Defined in: [src/parser/generator.ts:681](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L681) + +Parse a value from a given key path using the given inference type + +## Parameters + +### key + +`string` + +The key to parse + +### inference\_type + +[`InferenceType`](../type-aliases/InferenceType.md) + +The inference type to parse + +### data + +`unknown` + +The data to parse from + +### key\_path + +`string`[] = `...` + +The path to the key (excluding the key itself) + +## Returns + +`any` + +The parsed value diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/toParser.md b/docs/api/youtubei.js/namespaces/Generator/functions/toParser.md new file mode 100644 index 00000000..f1821cca --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/toParser.md @@ -0,0 +1,41 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / toParser + +# Function: toParser() + +> **toParser**(`key`, `inference_type`, `key_path`, `indentation`): `string` + +Defined in: [src/parser/generator.ts:578](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L578) + +Generate statements to parse a given inference type + +## Parameters + +### key + +`string` + +The key to parse + +### inference\_type + +[`InferenceType`](../type-aliases/InferenceType.md) + +The inference type to parse + +### key\_path + +`string`[] = `...` + +The path to the key (excluding the key itself) + +### indentation + +`number` = `1` + +The indentation level (used for objects) + +## Returns + +`string` + +Statement to parse the given key diff --git a/docs/api/youtubei.js/namespaces/Generator/functions/toTypeDeclaration.md b/docs/api/youtubei.js/namespaces/Generator/functions/toTypeDeclaration.md new file mode 100644 index 00000000..708835c6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/functions/toTypeDeclaration.md @@ -0,0 +1,29 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / toTypeDeclaration + +# Function: toTypeDeclaration() + +> **toTypeDeclaration**(`inference_type`, `indentation`): `string` + +Defined in: [src/parser/generator.ts:520](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L520) + +For a given inference type, get the typescript type declaration + +## Parameters + +### inference\_type + +[`InferenceType`](../type-aliases/InferenceType.md) + +The inference type to get the declaration for + +### indentation + +`number` = `0` + +The indentation level (used for objects) + +## Returns + +`string` + +Typescript type declaration diff --git a/docs/api/youtubei.js/namespaces/Generator/interfaces/ObjectInferenceType.md b/docs/api/youtubei.js/namespaces/Generator/interfaces/ObjectInferenceType.md new file mode 100644 index 00000000..5a1b212d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/interfaces/ObjectInferenceType.md @@ -0,0 +1,29 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / ObjectInferenceType + +# Interface: ObjectInferenceType + +Defined in: [src/parser/generator.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L37) + +## Properties + +### keys + +> **keys**: [`KeyInfo`](../type-aliases/KeyInfo.md) + +Defined in: [src/parser/generator.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L39) + +*** + +### optional + +> **optional**: `boolean` + +Defined in: [src/parser/generator.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L40) + +*** + +### type + +> **type**: `"object"` + +Defined in: [src/parser/generator.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L38) diff --git a/docs/api/youtubei.js/namespaces/Generator/interfaces/PrimitiveInferenceType.md b/docs/api/youtubei.js/namespaces/Generator/interfaces/PrimitiveInferenceType.md new file mode 100644 index 00000000..ff886157 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/interfaces/PrimitiveInferenceType.md @@ -0,0 +1,29 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / PrimitiveInferenceType + +# Interface: PrimitiveInferenceType + +Defined in: [src/parser/generator.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L49) + +## Properties + +### optional + +> **optional**: `boolean` + +Defined in: [src/parser/generator.ts:52](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L52) + +*** + +### type + +> **type**: `"primitive"` + +Defined in: [src/parser/generator.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L50) + +*** + +### typeof + +> **typeof**: (`"string"` \| `"number"` \| `"bigint"` \| `"boolean"` \| `"symbol"` \| `"undefined"` \| `"function"` \| `"unknown"` \| `"never"`)[] + +Defined in: [src/parser/generator.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/Generator/interfaces/RendererInferenceType.md b/docs/api/youtubei.js/namespaces/Generator/interfaces/RendererInferenceType.md new file mode 100644 index 00000000..095d2f5d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/interfaces/RendererInferenceType.md @@ -0,0 +1,29 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / RendererInferenceType + +# Interface: RendererInferenceType + +Defined in: [src/parser/generator.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L43) + +## Properties + +### optional + +> **optional**: `boolean` + +Defined in: [src/parser/generator.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L46) + +*** + +### renderers + +> **renderers**: `string`[] + +Defined in: [src/parser/generator.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L45) + +*** + +### type + +> **type**: `"renderer"` + +Defined in: [src/parser/generator.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L44) diff --git a/docs/api/youtubei.js/namespaces/Generator/type-aliases/ArrayInferenceType.md b/docs/api/youtubei.js/namespaces/Generator/type-aliases/ArrayInferenceType.md new file mode 100644 index 00000000..eb9b4b0f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/type-aliases/ArrayInferenceType.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / ArrayInferenceType + +# Type Alias: ArrayInferenceType + +> **ArrayInferenceType** = \{ `array_type`: `"primitive"`; `items`: [`PrimitiveInferenceType`](../interfaces/PrimitiveInferenceType.md); `optional`: `boolean`; `type`: `"array"`; \} \| \{ `array_type`: `"object"`; `items`: [`ObjectInferenceType`](../interfaces/ObjectInferenceType.md); `optional`: `boolean`; `type`: `"array"`; \} \| \{ `array_type`: `"renderer"`; `optional`: `boolean`; `renderers`: `string`[]; `type`: `"array"`; \} + +Defined in: [src/parser/generator.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L55) diff --git a/docs/api/youtubei.js/namespaces/Generator/type-aliases/InferenceType.md b/docs/api/youtubei.js/namespaces/Generator/type-aliases/InferenceType.md new file mode 100644 index 00000000..7146dee9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/type-aliases/InferenceType.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / InferenceType + +# Type Alias: InferenceType + +> **InferenceType** = [`RendererInferenceType`](../interfaces/RendererInferenceType.md) \| [`MiscInferenceType`](MiscInferenceType.md) \| [`ObjectInferenceType`](../interfaces/ObjectInferenceType.md) \| [`PrimitiveInferenceType`](../interfaces/PrimitiveInferenceType.md) \| [`ArrayInferenceType`](ArrayInferenceType.md) + +Defined in: [src/parser/generator.ts:72](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L72) diff --git a/docs/api/youtubei.js/namespaces/Generator/type-aliases/KeyInfo.md b/docs/api/youtubei.js/namespaces/Generator/type-aliases/KeyInfo.md new file mode 100644 index 00000000..ab817c1b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/type-aliases/KeyInfo.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / KeyInfo + +# Type Alias: KeyInfo + +> **KeyInfo** = readonly \[`string`, [`InferenceType`](InferenceType.md)\][] + +Defined in: [src/parser/generator.ts:74](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L74) diff --git a/docs/api/youtubei.js/namespaces/Generator/type-aliases/MiscInferenceType.md b/docs/api/youtubei.js/namespaces/Generator/type-aliases/MiscInferenceType.md new file mode 100644 index 00000000..9040c167 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Generator/type-aliases/MiscInferenceType.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Generator](../README.md) / MiscInferenceType + +# Type Alias: MiscInferenceType + +> **MiscInferenceType** = \{ `endpoint`: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md); `misc_type`: `"NavigationEndpoint"`; `optional`: `boolean`; `type`: `"misc"`; \} \| \{ `endpoint?`: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md); `misc_type`: `"Text"`; `optional`: `boolean`; `text`: `string`; `type`: `"misc"`; \} \| \{ `misc_type`: `"Thumbnail"`; `optional`: `boolean`; `type`: `"misc"`; \} \| \{ `misc_type`: `"Author"`; `optional`: `boolean`; `params`: \[`string`, `string`?\]; `type`: `"misc"`; \} + +Defined in: [src/parser/generator.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/generator.ts#L15) diff --git a/docs/api/namespaces/Helpers/README.md b/docs/api/youtubei.js/namespaces/Helpers/README.md similarity index 75% rename from docs/api/namespaces/Helpers/README.md rename to docs/api/youtubei.js/namespaces/Helpers/README.md index 4b3e3ea7..4d252009 100644 --- a/docs/api/namespaces/Helpers/README.md +++ b/docs/api/youtubei.js/namespaces/Helpers/README.md @@ -1,25 +1,23 @@ -[youtubei.js](../../README.md) / Helpers +[youtubei.js](../../../README.md) / Helpers # Helpers -## Index - -### Classes +## Classes - [Maybe](classes/Maybe.md) - [Memo](classes/Memo.md) - [SuperParsedResult](classes/SuperParsedResult.md) - [YTNode](classes/YTNode.md) -### Interfaces +## Interfaces - [Constructor](interfaces/Constructor.md) - [YTNodeConstructor](interfaces/YTNodeConstructor.md) -### Type Aliases +## Type Aliases - [ObservedArray](type-aliases/ObservedArray.md) -### Functions +## Functions - [observe](functions/observe.md) diff --git a/docs/api/youtubei.js/namespaces/Helpers/classes/Maybe.md b/docs/api/youtubei.js/namespaces/Helpers/classes/Maybe.md new file mode 100644 index 00000000..49bfab5e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Helpers/classes/Maybe.md @@ -0,0 +1,563 @@ +[youtubei.js](../../../../README.md) / [Helpers](../README.md) / Maybe + +# Class: Maybe + +Defined in: [src/parser/helpers.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L64) + +A wrapper class that provides type-safe access to a value. + +## Constructors + +### Constructor + +> **new Maybe**(`value`): `Maybe` + +Defined in: [src/parser/helpers.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L67) + +#### Parameters + +##### value + +`any` + +#### Returns + +`Maybe` + +## Accessors + +### typeof + +#### Get Signature + +> **get** **typeof**(): `"string"` \| `"number"` \| `"bigint"` \| `"boolean"` \| `"symbol"` \| `"undefined"` \| `"object"` \| `"function"` + +Defined in: [src/parser/helpers.ts:82](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L82) + +##### Returns + +`"string"` \| `"number"` \| `"bigint"` \| `"boolean"` \| `"symbol"` \| `"undefined"` \| `"object"` \| `"function"` + +## Methods + +### ~~any()~~ + +> **any**(): `any` + +Defined in: [src/parser/helpers.ts:278](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L278) + +#### Returns + +`any` + +#### Deprecated + +This call is not meant to be used outside of debugging. Please use the specific type getter instead. + +*** + +### array() + +> **array**(): `any`[] + +Defined in: [src/parser/helpers.ts:166](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L166) + +Get the value as an array. + +#### Returns + +`any`[] + +the value as any[]. + +#### Throws + +If the value is not an array. + +*** + +### arrayOfMaybe() + +> **arrayOfMaybe**(): `Maybe`[] + +Defined in: [src/parser/helpers.ts:178](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L178) + +More typesafe variant of [Maybe#array](#array). + +#### Returns + +`Maybe`[] + +a proxied array which returns all the values as Maybe. + +#### Throws + +If the value is not an array + +*** + +### bigint() + +> **bigint**(): `bigint` + +Defined in: [src/parser/helpers.ts:102](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L102) + +#### Returns + +`bigint` + +*** + +### boolean() + +> **boolean**(): `boolean` + +Defined in: [src/parser/helpers.ts:110](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L110) + +#### Returns + +`boolean` + +*** + +### function() + +> **function**(): `Function` + +Defined in: [src/parser/helpers.ts:153](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L153) + +#### Returns + +`Function` + +*** + +### instanceof() + +> **instanceof**\<`T`\>(`type`): `T` + +Defined in: [src/parser/helpers.ts:289](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L289) + +Get the node as an instance of the given class. + +#### Type Parameters + +##### T + +`T` *extends* `object` + +#### Parameters + +##### type + +[`Constructor`](../interfaces/Constructor.md)\<`T`\> + +The type to check. + +#### Returns + +`T` + +the value as the given type. + +#### Throws + +If the node is not of the given type. + +*** + +### isArray() + +> **isArray**(): `boolean` + +Defined in: [src/parser/helpers.ts:194](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L194) + +Check whether the value is an array. + +#### Returns + +`boolean` + +whether the value is an array. + +*** + +### isBigint() + +> **isBigint**(): `boolean` + +Defined in: [src/parser/helpers.ts:106](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L106) + +#### Returns + +`boolean` + +*** + +### isBoolean() + +> **isBoolean**(): `boolean` + +Defined in: [src/parser/helpers.ts:114](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L114) + +#### Returns + +`boolean` + +*** + +### isFunction() + +> **isFunction**(): `boolean` + +Defined in: [src/parser/helpers.ts:157](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L157) + +#### Returns + +`boolean` + +*** + +### isInstanceof() + +> **isInstanceof**\<`T`\>(`type`): `this is Maybe & T` + +Defined in: [src/parser/helpers.ts:301](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L301) + +Check if the node is an instance of the given class. + +#### Type Parameters + +##### T + +`T` *extends* `object` + +#### Parameters + +##### type + +[`Constructor`](../interfaces/Constructor.md)\<`T`\> + +The type to check. + +#### Returns + +`this is Maybe & T` + +Whether the node is an instance of the given type. + +*** + +### isNode() + +> **isNode**(): `boolean` + +Defined in: [src/parser/helpers.ts:214](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L214) + +Check if the value is a YTNode. + +#### Returns + +`boolean` + +Whether the value is a YTNode. + +*** + +### isNodeOfType() + +> **isNodeOfType**\<`T`, `K`\>(...`types`): `boolean` + +Defined in: [src/parser/helpers.ts:233](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L233) + +Check if the value is a YTNode of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +the type(s) to check. + +#### Returns + +`boolean` + +Whether the value is a YTNode of the given type. + +*** + +### isNull() + +> **isNull**(): `boolean` + +Defined in: [src/parser/helpers.ts:140](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L140) + +#### Returns + +`boolean` + +*** + +### isNumber() + +> **isNumber**(): `boolean` + +Defined in: [src/parser/helpers.ts:98](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L98) + +#### Returns + +`boolean` + +*** + +### isObject() + +> **isObject**(): `boolean` + +Defined in: [src/parser/helpers.ts:148](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L148) + +#### Returns + +`boolean` + +*** + +### isObserved() + +> **isObserved**(): `any` + +Defined in: [src/parser/helpers.ts:251](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L251) + +Check if the value is an ObservedArray. + +#### Returns + +`any` + +*** + +### isParsed() + +> **isParsed**(): `boolean` + +Defined in: [src/parser/helpers.ts:270](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L270) + +Is the result a SuperParsedResult? + +#### Returns + +`boolean` + +*** + +### isString() + +> **isString**(): `boolean` + +Defined in: [src/parser/helpers.ts:90](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L90) + +#### Returns + +`boolean` + +*** + +### isSymbol() + +> **isSymbol**(): `boolean` + +Defined in: [src/parser/helpers.ts:122](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L122) + +#### Returns + +`boolean` + +*** + +### isUndefined() + +> **isUndefined**(): `boolean` + +Defined in: [src/parser/helpers.ts:130](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L130) + +#### Returns + +`boolean` + +*** + +### node() + +> **node**(): [`YTNode`](YTNode.md) + +Defined in: [src/parser/helpers.ts:203](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L203) + +Get the value as a YTNode. + +#### Returns + +[`YTNode`](YTNode.md) + +the value as a YTNode. + +#### Throws + +If the value is not a YTNode. + +*** + +### nodeOfType() + +> **nodeOfType**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:224](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L224) + +Get the value as a YTNode of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type(s) to cast to. + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to the given type. + +#### Throws + +If the node is not of the given type. + +*** + +### null() + +> **null**(): `null` + +Defined in: [src/parser/helpers.ts:134](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L134) + +#### Returns + +`null` + +*** + +### number() + +> **number**(): `number` + +Defined in: [src/parser/helpers.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L94) + +#### Returns + +`number` + +*** + +### object() + +> **object**(): `object` + +Defined in: [src/parser/helpers.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L144) + +#### Returns + +`object` + +*** + +### observed() + +> **observed**(): [`ObservedArray`](../type-aliases/ObservedArray.md)\<[`YTNode`](YTNode.md)\> + +Defined in: [src/parser/helpers.ts:241](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L241) + +Get the value as an ObservedArray. + +#### Returns + +[`ObservedArray`](../type-aliases/ObservedArray.md)\<[`YTNode`](YTNode.md)\> + +the value of the Maybe as a ObservedArray. + +*** + +### parsed() + +> **parsed**(): [`SuperParsedResult`](SuperParsedResult.md) + +Defined in: [src/parser/helpers.ts:260](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L260) + +Get the value of the Maybe as a SuperParsedResult. + +#### Returns + +[`SuperParsedResult`](SuperParsedResult.md) + +the value as a SuperParsedResult. + +#### Throws + +If the value is not a SuperParsedResult. + +*** + +### string() + +> **string**(): `string` + +Defined in: [src/parser/helpers.ts:86](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L86) + +#### Returns + +`string` + +*** + +### symbol() + +> **symbol**(): `symbol` + +Defined in: [src/parser/helpers.ts:118](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L118) + +#### Returns + +`symbol` + +*** + +### undefined() + +> **undefined**(): `undefined` + +Defined in: [src/parser/helpers.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L126) + +#### Returns + +`undefined` diff --git a/docs/api/namespaces/Helpers/classes/Memo.md b/docs/api/youtubei.js/namespaces/Helpers/classes/Memo.md similarity index 54% rename from docs/api/namespaces/Helpers/classes/Memo.md rename to docs/api/youtubei.js/namespaces/Helpers/classes/Memo.md index 424b5c71..6b860a1b 100644 --- a/docs/api/namespaces/Helpers/classes/Memo.md +++ b/docs/api/youtubei.js/namespaces/Helpers/classes/Memo.md @@ -1,121 +1,121 @@ -[youtubei.js](../../../README.md) / [Helpers](../README.md) / Memo +[youtubei.js](../../../../README.md) / [Helpers](../README.md) / Memo # Class: Memo +Defined in: [src/parser/helpers.ts:502](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L502) + ## Extends - `Map`\<`string`, [`YTNode`](YTNode.md)[]\> ## Constructors -### new Memo() +### Constructor -> **new Memo**(`entries`?): [`Memo`](Memo.md) +> **new Memo**(`entries?`): `Memo` + +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:50 #### Parameters -• **entries?**: `null` \| readonly readonly [`string`, [`YTNode`](YTNode.md)[]][] +##### entries? + +readonly readonly \[`string`, [`YTNode`](YTNode.md)[]\][] | `null` #### Returns -[`Memo`](Memo.md) +`Memo` #### Inherited from `Map.constructor` -#### Defined in +### Constructor -node\_modules/typescript/lib/lib.es2015.collection.d.ts:50 +> **new Memo**(`iterable?`): `Memo` -### new Memo() - -> **new Memo**(`iterable`?): [`Memo`](Memo.md) +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:49 #### Parameters -• **iterable?**: `null` \| `Iterable`\ +##### iterable? + +`Iterable`\ | `null` #### Returns -[`Memo`](Memo.md) +`Memo` #### Inherited from `Map.constructor` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.collection.d.ts:49 - ## Properties ### \[toStringTag\] > `readonly` **\[toStringTag\]**: `string` +Defined in: node\_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:137 + #### Inherited from `Map.[toStringTag]` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:137 - *** ### size > `readonly` **size**: `number` +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:45 + +#### Returns + +the number of elements in the Map. + #### Inherited from `Map.size` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.collection.d.ts:45 - *** ### \[species\] > `readonly` `static` **\[species\]**: `MapConstructor` +Defined in: node\_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:319 + #### Inherited from `Map.[species]` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:319 - ## Methods ### \[iterator\]() -> **\[iterator\]**(): `IterableIterator`\<[`string`, [`YTNode`](YTNode.md)[]]\> +> **\[iterator\]**(): `IterableIterator`\<\[`string`, [`YTNode`](YTNode.md)[]\]\> + +Defined in: node\_modules/typescript/lib/lib.es2015.iterable.d.ts:119 Returns an iterable of entries in the map. #### Returns -`IterableIterator`\<[`string`, [`YTNode`](YTNode.md)[]]\> +`IterableIterator`\<\[`string`, [`YTNode`](YTNode.md)[]\]\> #### Inherited from `Map.[iterator]` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.iterable.d.ts:119 - *** ### clear() > **clear**(): `void` +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:20 + #### Returns `void` @@ -124,19 +124,19 @@ node\_modules/typescript/lib/lib.es2015.iterable.d.ts:119 `Map.clear` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.collection.d.ts:20 - *** ### delete() > **delete**(`key`): `boolean` +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:24 + #### Parameters -• **key**: `string` +##### key + +`string` #### Returns @@ -148,43 +148,43 @@ true if an element in the Map existed and has been removed, or false if the elem `Map.delete` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.collection.d.ts:24 - *** ### entries() -> **entries**(): `IterableIterator`\<[`string`, [`YTNode`](YTNode.md)[]]\> +> **entries**(): `IterableIterator`\<\[`string`, [`YTNode`](YTNode.md)[]\]\> + +Defined in: node\_modules/typescript/lib/lib.es2015.iterable.d.ts:124 Returns an iterable of key, value pairs for every entry in the map. #### Returns -`IterableIterator`\<[`string`, [`YTNode`](YTNode.md)[]]\> +`IterableIterator`\<\[`string`, [`YTNode`](YTNode.md)[]\]\> #### Inherited from `Map.entries` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.iterable.d.ts:124 - *** ### forEach() -> **forEach**(`callbackfn`, `thisArg`?): `void` +> **forEach**(`callbackfn`, `thisArg?`): `void` + +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:28 Executes a provided function once per each key/value pair in the Map, in insertion order. #### Parameters -• **callbackfn** +##### callbackfn -• **thisArg?**: `any` +(`value`, `key`, `map`) => `void` + +##### thisArg? + +`any` #### Returns @@ -194,25 +194,25 @@ Executes a provided function once per each key/value pair in the Map, in inserti `Map.forEach` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.collection.d.ts:28 - *** ### get() -> **get**(`key`): `undefined` \| [`YTNode`](YTNode.md)[] +> **get**(`key`): [`YTNode`](YTNode.md)[] \| `undefined` + +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:33 Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. #### Parameters -• **key**: `string` +##### key + +`string` #### Returns -`undefined` \| [`YTNode`](YTNode.md)[] +[`YTNode`](YTNode.md)[] \| `undefined` Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. @@ -220,67 +220,75 @@ Returns the element associated with the specified key. If no element is associat `Map.get` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.collection.d.ts:33 - *** ### getType() -#### getType(types) +#### Call Signature > **getType**\<`T`, `K`\>(`types`): [`ObservedArray`](../type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> +Defined in: [src/parser/helpers.ts:503](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L503) + ##### Type Parameters -• **T** *extends* [`YTNode`](YTNode.md) +###### T -• **K** *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](YTNode.md) + +###### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] ##### Parameters -• **types**: `K` +###### types + +`K` ##### Returns [`ObservedArray`](../type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> -##### Defined in - -[src/parser/helpers.ts:503](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L503) - -#### getType(types) +#### Call Signature > **getType**\<`T`, `K`\>(...`types`): [`ObservedArray`](../type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> +Defined in: [src/parser/helpers.ts:504](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L504) + ##### Type Parameters -• **T** *extends* [`YTNode`](YTNode.md) +###### T -• **K** *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](YTNode.md) + +###### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] ##### Parameters -• ...**types**: `K` +###### types + +...`K` ##### Returns [`ObservedArray`](../type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> -##### Defined in - -[src/parser/helpers.ts:504](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L504) - *** ### has() > **has**(`key`): `boolean` +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:37 + #### Parameters -• **key**: `string` +##### key + +`string` #### Returns @@ -292,16 +300,14 @@ boolean indicating whether an element with the specified key exists or not. `Map.has` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.collection.d.ts:37 - *** ### keys() > **keys**(): `IterableIterator`\<`string`\> +Defined in: node\_modules/typescript/lib/lib.es2015.iterable.d.ts:129 + Returns an iterable of keys in the map #### Returns @@ -312,23 +318,25 @@ Returns an iterable of keys in the map `Map.keys` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.iterable.d.ts:129 - *** ### set() > **set**(`key`, `value`): `this` +Defined in: node\_modules/typescript/lib/lib.es2015.collection.d.ts:41 + Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. #### Parameters -• **key**: `string` +##### key -• **value**: [`YTNode`](YTNode.md)[] +`string` + +##### value + +[`YTNode`](YTNode.md)[] #### Returns @@ -338,16 +346,14 @@ Adds a new element with a specified key and value to the Map. If an element with `Map.set` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.collection.d.ts:41 - *** ### values() > **values**(): `IterableIterator`\<[`YTNode`](YTNode.md)[]\> +Defined in: node\_modules/typescript/lib/lib.es2015.iterable.d.ts:134 + Returns an iterable of values in the map #### Returns @@ -358,31 +364,37 @@ Returns an iterable of values in the map `Map.values` -#### Defined in - -node\_modules/typescript/lib/lib.es2015.iterable.d.ts:134 - *** ### groupBy() > `static` **groupBy**\<`K`, `T`\>(`items`, `keySelector`): `Map`\<`K`, `T`[]\> +Defined in: node\_modules/typescript/lib/lib.esnext.collection.d.ts:25 + Groups members of an iterable according to the return value of the passed callback. #### Type Parameters -• **K** +##### K -• **T** +`K` + +##### T + +`T` #### Parameters -• **items**: `Iterable`\<`T`\> +##### items + +`Iterable`\<`T`\> An iterable. -• **keySelector** +##### keySelector + +(`item`, `index`) => `K` A callback which will be invoked for each item in items. @@ -393,7 +405,3 @@ A callback which will be invoked for each item in items. #### Inherited from `Map.groupBy` - -#### Defined in - -node\_modules/typescript/lib/lib.esnext.collection.d.ts:25 diff --git a/docs/api/youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md b/docs/api/youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md new file mode 100644 index 00000000..658022bc --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Helpers/classes/SuperParsedResult.md @@ -0,0 +1,97 @@ +[youtubei.js](../../../../README.md) / [Helpers](../README.md) / SuperParsedResult + +# Class: SuperParsedResult\ + +Defined in: [src/parser/helpers.ts:318](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L318) + +Represents a parsed response in an unknown state. Either a YTNode or a YTNode[] or null. + +## Type Parameters + +### T + +`T` *extends* [`YTNode`](YTNode.md) = [`YTNode`](YTNode.md) + +## Constructors + +### Constructor + +> **new SuperParsedResult**\<`T`\>(`result`): `SuperParsedResult`\<`T`\> + +Defined in: [src/parser/helpers.ts:321](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L321) + +#### Parameters + +##### result + +`T` | [`ObservedArray`](../type-aliases/ObservedArray.md)\<`T`\> | `null` + +#### Returns + +`SuperParsedResult`\<`T`\> + +## Accessors + +### is\_array + +#### Get Signature + +> **get** **is\_array**(): `boolean` + +Defined in: [src/parser/helpers.ts:328](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L328) + +##### Returns + +`boolean` + +*** + +### is\_node + +#### Get Signature + +> **get** **is\_node**(): `boolean` + +Defined in: [src/parser/helpers.ts:331](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L331) + +##### Returns + +`boolean` + +*** + +### is\_null + +#### Get Signature + +> **get** **is\_null**(): `boolean` + +Defined in: [src/parser/helpers.ts:325](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L325) + +##### Returns + +`boolean` + +## Methods + +### array() + +> **array**(): [`ObservedArray`](../type-aliases/ObservedArray.md)\<`T`\> + +Defined in: [src/parser/helpers.ts:335](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L335) + +#### Returns + +[`ObservedArray`](../type-aliases/ObservedArray.md)\<`T`\> + +*** + +### item() + +> **item**(): `T` + +Defined in: [src/parser/helpers.ts:342](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L342) + +#### Returns + +`T` diff --git a/docs/api/namespaces/Helpers/classes/YTNode.md b/docs/api/youtubei.js/namespaces/Helpers/classes/YTNode.md similarity index 93% rename from docs/api/namespaces/Helpers/classes/YTNode.md rename to docs/api/youtubei.js/namespaces/Helpers/classes/YTNode.md index 4a3ce31c..88d157fa 100644 --- a/docs/api/namespaces/Helpers/classes/YTNode.md +++ b/docs/api/youtubei.js/namespaces/Helpers/classes/YTNode.md @@ -1,9 +1,24 @@ -[youtubei.js](../../../README.md) / [Helpers](../README.md) / YTNode +[youtubei.js](../../../../README.md) / [Helpers](../README.md) / YTNode # Class: YTNode +Defined in: [src/parser/helpers.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L6) + ## Extended by +- [`ItemSectionContinuation`](../../../../classes/ItemSectionContinuation.md) +- [`NavigateAction`](../../../../classes/NavigateAction.md) +- [`ShowMiniplayerCommand`](../../../../classes/ShowMiniplayerCommand.md) +- [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) +- [`SectionListContinuation`](../../../../classes/SectionListContinuation.md) +- [`MusicPlaylistShelfContinuation`](../../../../classes/MusicPlaylistShelfContinuation.md) +- [`MusicShelfContinuation`](../../../../classes/MusicShelfContinuation.md) +- [`GridContinuation`](../../../../classes/GridContinuation.md) +- [`PlaylistPanelContinuation`](../../../../classes/PlaylistPanelContinuation.md) +- [`Continuation`](../../../../classes/Continuation.md) +- [`LiveChatContinuation`](../../../../classes/LiveChatContinuation.md) +- [`ContinuationCommand`](../../../../classes/ContinuationCommand.md) +- [`AppendContinuationItemsAction`](../../../../classes/AppendContinuationItemsAction.md) - [`ChildElement`](../../Misc/classes/ChildElement.md) - [`AboutChannel`](../../YTNodes/classes/AboutChannel.md) - [`AboutChannelView`](../../YTNodes/classes/AboutChannelView.md) @@ -12,7 +27,6 @@ - [`AccountItemSection`](../../YTNodes/classes/AccountItemSection.md) - [`AccountItemSectionHeader`](../../YTNodes/classes/AccountItemSectionHeader.md) - [`AccountSectionList`](../../YTNodes/classes/AccountSectionList.md) -- [`AppendContinuationItemsAction`](../../YTNodes/classes/AppendContinuationItemsAction.md) - [`ChangeEngagementPanelVisibilityAction`](../../YTNodes/classes/ChangeEngagementPanelVisibilityAction.md) - [`GetMultiPageMenuAction`](../../YTNodes/classes/GetMultiPageMenuAction.md) - [`OpenPopupAction`](../../YTNodes/classes/OpenPopupAction.md) @@ -179,7 +193,9 @@ - [`FeedNudge`](../../YTNodes/classes/FeedNudge.md) - [`FeedTabbedHeader`](../../YTNodes/classes/FeedTabbedHeader.md) - [`FlexibleActionsView`](../../YTNodes/classes/FlexibleActionsView.md) +- [`Form`](../../YTNodes/classes/Form.md) - [`FormFooterView`](../../YTNodes/classes/FormFooterView.md) +- [`FormPopup`](../../YTNodes/classes/FormPopup.md) - [`GameCard`](../../YTNodes/classes/GameCard.md) - [`GameDetails`](../../YTNodes/classes/GameDetails.md) - [`Grid`](../../YTNodes/classes/Grid.md) @@ -529,32 +545,18 @@ - [`KidsCategoriesHeader`](../../YTNodes/classes/KidsCategoriesHeader.md) - [`KidsCategoryTab`](../../YTNodes/classes/KidsCategoryTab.md) - [`KidsHomeScreen`](../../YTNodes/classes/KidsHomeScreen.md) -- [`ItemSectionContinuation`](../../../classes/ItemSectionContinuation.md) -- [`NavigateAction`](../../../classes/NavigateAction.md) -- [`ShowMiniplayerCommand`](../../../classes/ShowMiniplayerCommand.md) -- [`ReloadContinuationItemsCommand`](../../../classes/ReloadContinuationItemsCommand.md) -- [`SectionListContinuation`](../../../classes/SectionListContinuation.md) -- [`MusicPlaylistShelfContinuation`](../../../classes/MusicPlaylistShelfContinuation.md) -- [`MusicShelfContinuation`](../../../classes/MusicShelfContinuation.md) -- [`GridContinuation`](../../../classes/GridContinuation.md) -- [`PlaylistPanelContinuation`](../../../classes/PlaylistPanelContinuation.md) -- [`Continuation`](../../../classes/Continuation.md) -- [`LiveChatContinuation`](../../../classes/LiveChatContinuation.md) -- [`ContinuationCommand`](../../../classes/ContinuationCommand.md) ## Constructors -### new YTNode() +### Constructor -> **new YTNode**(): [`YTNode`](YTNode.md) +> **new YTNode**(): `YTNode` + +Defined in: [src/parser/helpers.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L10) #### Returns -[`YTNode`](YTNode.md) - -#### Defined in - -[src/parser/helpers.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L10) +`YTNode` ## Properties @@ -562,9 +564,7 @@ > `readonly` **type**: `string` -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) *** @@ -572,9 +572,7 @@ > `readonly` `static` **type**: `string` = `'YTNode'` -#### Defined in - -[src/parser/helpers.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L7) +Defined in: [src/parser/helpers.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L7) ## Methods @@ -582,17 +580,25 @@ > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* `YTNode` + +##### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -606,27 +612,31 @@ The node cast to one of the given types If the node is not of the given type -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is YTNode & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -636,27 +646,31 @@ The key to check Whether the node has the key -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* `YTNode` + +##### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -666,27 +680,31 @@ The type to check whether the node is of the given type -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -699,7 +717,3 @@ The value of the key wrapped in a Maybe #### Throws If the node does not have the key - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/namespaces/Helpers/functions/observe.md b/docs/api/youtubei.js/namespaces/Helpers/functions/observe.md similarity index 55% rename from docs/api/namespaces/Helpers/functions/observe.md rename to docs/api/youtubei.js/namespaces/Helpers/functions/observe.md index 72497ee3..4e31c826 100644 --- a/docs/api/namespaces/Helpers/functions/observe.md +++ b/docs/api/youtubei.js/namespaces/Helpers/functions/observe.md @@ -1,27 +1,29 @@ -[youtubei.js](../../../README.md) / [Helpers](../README.md) / observe +[youtubei.js](../../../../README.md) / [Helpers](../README.md) / observe # Function: observe() > **observe**\<`T`\>(`obj`): [`ObservedArray`](../type-aliases/ObservedArray.md)\<`T`\> +Defined in: [src/parser/helpers.ts:424](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L424) + Creates an observed array that provides additional utility methods for array manipulation and filtering. ## Type Parameters -• **T** *extends* [`YTNode`](../classes/YTNode.md) +### T + +`T` *extends* [`YTNode`](../classes/YTNode.md) Type extending YTNode ## Parameters -• **obj**: `T`[] +### obj + +`T`[] Array to be observed ## Returns [`ObservedArray`](../type-aliases/ObservedArray.md)\<`T`\> - -## Defined in - -[src/parser/helpers.ts:424](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L424) diff --git a/docs/api/youtubei.js/namespaces/Helpers/interfaces/Constructor.md b/docs/api/youtubei.js/namespaces/Helpers/interfaces/Constructor.md new file mode 100644 index 00000000..1a648516 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Helpers/interfaces/Constructor.md @@ -0,0 +1,29 @@ +[youtubei.js](../../../../README.md) / [Helpers](../README.md) / Constructor + +# Interface: Constructor\ + +Defined in: [src/parser/helpers.ts:306](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L306) + +## Type Parameters + +### T + +`T` + +## Constructors + +### Constructor + +> **new Constructor**(...`args`): `T` + +Defined in: [src/parser/helpers.ts:307](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L307) + +#### Parameters + +##### args + +...`any`[] + +#### Returns + +`T` diff --git a/docs/api/youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md b/docs/api/youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md new file mode 100644 index 00000000..a475f3b2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md @@ -0,0 +1,37 @@ +[youtubei.js](../../../../README.md) / [Helpers](../README.md) / YTNodeConstructor + +# Interface: YTNodeConstructor\ + +Defined in: [src/parser/helpers.ts:310](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L310) + +## Type Parameters + +### T + +`T` *extends* [`YTNode`](../classes/YTNode.md) = [`YTNode`](../classes/YTNode.md) + +## Constructors + +### Constructor + +> **new YTNodeConstructor**(`data`): `T` + +Defined in: [src/parser/helpers.ts:311](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L311) + +#### Parameters + +##### data + +`any` + +#### Returns + +`T` + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:312](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L312) diff --git a/docs/api/namespaces/Helpers/type-aliases/ObservedArray.md b/docs/api/youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md similarity index 60% rename from docs/api/namespaces/Helpers/type-aliases/ObservedArray.md rename to docs/api/youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md index 45ca1d16..008a8c65 100644 --- a/docs/api/namespaces/Helpers/type-aliases/ObservedArray.md +++ b/docs/api/youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md @@ -1,12 +1,14 @@ -[youtubei.js](../../../README.md) / [Helpers](../README.md) / ObservedArray +[youtubei.js](../../../../README.md) / [Helpers](../README.md) / ObservedArray # Type Alias: ObservedArray\ -> **ObservedArray**\<`T`\>: `T`[] & `object` +> **ObservedArray**\<`T`\> = `T`[] & `object` + +Defined in: [src/parser/helpers.ts:353](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L353) An extended array type that includes additional utility methods for filtering and manipulating YTNode objects. -## Type declaration +## Type Declaration ### first() @@ -22,17 +24,21 @@ The first item in the array ### get() -> **get**: (`rule`, `del_item`?) => `T` \| `undefined` +> **get**: (`rule`, `del_item?`) => `T` \| `undefined` Returns the first object that matches the specified rule object. #### Parameters -• **rule**: `object` +##### rule + +`object` An object containing properties to match against -• **del\_item?**: `boolean` +##### del\_item? + +`boolean` Optional flag to remove the matched item from the array @@ -44,17 +50,21 @@ The first matching object or undefined if no match is found ### getAll() -> **getAll**: (`rule`, `del_items`?) => `T`[] +> **getAll**: (`rule`, `del_items?`) => `T`[] Returns all objects that match the specified rule object. #### Parameters -• **rule**: `object` +##### rule + +`object` An object containing properties to match against -• **del\_items?**: `boolean` +##### del\_items? + +`boolean` Optional flag to remove all matched items from the array @@ -72,7 +82,9 @@ Returns the first object that satisfies the provided condition function. #### Parameters -• **condition** +##### condition + +(`node`) => `boolean` A predicate function that tests each element @@ -90,7 +102,9 @@ Removes the item at the specified index. #### Parameters -• **index**: `number` +##### index + +`number` The index of the item to remove @@ -102,27 +116,35 @@ The modified array after removal ### as() +> **as**\<`R`, `K`\>(...`types`): `ObservedArray`\<`InstanceType`\<`K`\[`number`\]\>\> + Similar to `filter` but with strict type checking. Filters the array to include only items of the specified types. #### Type Parameters -• **R** *extends* [`YTNode`](../classes/YTNode.md) +##### R + +`R` *extends* [`YTNode`](../classes/YTNode.md) Type extending YTNode -• **K** *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`R`\>[] +##### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`R`\>[] Array of types (YTNodes) #### Parameters -• ...**types**: `K` +##### types + +...`K` Rest parameter of YTNode constructor types to filter by #### Returns -[`ObservedArray`](ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> +`ObservedArray`\<`InstanceType`\<`K`\[`number`\]\>\> A new ObservedArray containing only items of the specified types @@ -132,60 +154,74 @@ If an item is not of the specified type ### filterType() +> **filterType**\<`R`, `K`\>(...`types`): `ObservedArray`\<`InstanceType`\<`K`\[`number`\]\>\> + Filters the array to only include items of the specified YTNode types. #### Type Parameters -• **R** *extends* [`YTNode`](../classes/YTNode.md) +##### R + +`R` *extends* [`YTNode`](../classes/YTNode.md) Type extending YTNode -• **K** *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`R`\>[] +##### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`R`\>[] Array of types (YTNodes) #### Parameters -• ...**types**: `K` +##### types + +...`K` Rest parameter of YTNode constructor types to filter by #### Returns -[`ObservedArray`](ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> +`ObservedArray`\<`InstanceType`\<`K`\[`number`\]\>\> A new ObservedArray containing only items of the specified types ### firstOfType() +> **firstOfType**\<`R`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> \| `undefined` + Returns the first item in the array that matches any of the specified YTNode types. #### Type Parameters -• **R** *extends* [`YTNode`](../classes/YTNode.md) +##### R + +`R` *extends* [`YTNode`](../classes/YTNode.md) Type extending YTNode -• **K** *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`R`\>[] +##### K + +`K` *extends* [`YTNodeConstructor`](../interfaces/YTNodeConstructor.md)\<`R`\>[] Array of types (YTNodes) #### Parameters -• ...**types**: `K` +##### types + +...`K` Rest parameter of YTNode constructor types to match against #### Returns -`undefined` \| `InstanceType`\<`K`\[`number`\]\> +`InstanceType`\<`K`\[`number`\]\> \| `undefined` The first matching item or undefined if none found ## Type Parameters -• **T** *extends* [`YTNode`](../classes/YTNode.md) = [`YTNode`](../classes/YTNode.md) +### T -## Defined in - -[src/parser/helpers.ts:353](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L353) +`T` *extends* [`YTNode`](../classes/YTNode.md) = [`YTNode`](../classes/YTNode.md) diff --git a/docs/api/namespaces/JsHelpers/README.md b/docs/api/youtubei.js/namespaces/JsHelpers/README.md similarity index 84% rename from docs/api/namespaces/JsHelpers/README.md rename to docs/api/youtubei.js/namespaces/JsHelpers/README.md index 6d8e7535..be3c1dd4 100644 --- a/docs/api/namespaces/JsHelpers/README.md +++ b/docs/api/youtubei.js/namespaces/JsHelpers/README.md @@ -1,26 +1,24 @@ -[youtubei.js](../../README.md) / JsHelpers +[youtubei.js](../../../README.md) / JsHelpers # JsHelpers -## Index - -### Interfaces +## Interfaces - [AstVisitObject](interfaces/AstVisitObject.md) -### Type Aliases +## Type Aliases - [AstVisitFn](type-aliases/AstVisitFn.md) - [AstVisitor](type-aliases/AstVisitor.md) - [AstVisitResult](type-aliases/AstVisitResult.md) -### Variables +## Variables - [indent](variables/indent.md) - [jsBuiltIns](variables/jsBuiltIns.md) - [WALK\_STOP](variables/WALK_STOP.md) -### Functions +## Functions - [createWrapperFunction](functions/createWrapperFunction.md) - [extractNodeSource](functions/extractNodeSource.md) diff --git a/docs/api/namespaces/JsHelpers/functions/createWrapperFunction.md b/docs/api/youtubei.js/namespaces/JsHelpers/functions/createWrapperFunction.md similarity index 69% rename from docs/api/namespaces/JsHelpers/functions/createWrapperFunction.md rename to docs/api/youtubei.js/namespaces/JsHelpers/functions/createWrapperFunction.md index 9f24e600..2e479c79 100644 --- a/docs/api/namespaces/JsHelpers/functions/createWrapperFunction.md +++ b/docs/api/youtubei.js/namespaces/JsHelpers/functions/createWrapperFunction.md @@ -1,9 +1,11 @@ -[youtubei.js](../../../README.md) / [JsHelpers](../README.md) / createWrapperFunction +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / createWrapperFunction # Function: createWrapperFunction() > **createWrapperFunction**(`analyzer`, `name`, `node`): `string` \| `undefined` +Defined in: [src/utils/javascript/helpers.ts:223](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L223) + Analyzes an AST node to determine if it's a function call or a function declaration. Based on that, it then creates a new JavaScript function as a string. This new function acts as a wrapper, taking a single 'input' @@ -15,15 +17,21 @@ Currently can handle: ## Parameters -• **analyzer**: [`JsAnalyzer`](../../Types/classes/JsAnalyzer.md) +### analyzer + +[`JsAnalyzer`](../../Types/classes/JsAnalyzer.md) The `JSAnalyzer` instance, used to resolve context like declared variables. -• **name**: `string` +### name + +`string` The name for the new wrapper function to be created. -• **node**: `Node` +### node + +`Node` The ESTree node. @@ -34,7 +42,3 @@ The ESTree node. ## Todo Look for edge cases. - -## Defined in - -[src/utils/javascript/helpers.ts:223](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/javascript/helpers.ts#L223) diff --git a/docs/api/namespaces/JsHelpers/functions/extractNodeSource.md b/docs/api/youtubei.js/namespaces/JsHelpers/functions/extractNodeSource.md similarity index 51% rename from docs/api/namespaces/JsHelpers/functions/extractNodeSource.md rename to docs/api/youtubei.js/namespaces/JsHelpers/functions/extractNodeSource.md index df3db653..90792ebb 100644 --- a/docs/api/namespaces/JsHelpers/functions/extractNodeSource.md +++ b/docs/api/youtubei.js/namespaces/JsHelpers/functions/extractNodeSource.md @@ -1,18 +1,24 @@ -[youtubei.js](../../../README.md) / [JsHelpers](../README.md) / extractNodeSource +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / extractNodeSource # Function: extractNodeSource() > **extractNodeSource**(`node`, `source`): `string` \| `null` +Defined in: [src/utils/javascript/helpers.ts:143](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L143) + Extracts the source code corresponding to a given AST node. ## Parameters -• **node**: `undefined` \| `null` \| `Node` +### node The AST node to extract source from. -• **source**: `string` +`Node` | `null` | `undefined` + +### source + +`string` The original source code. @@ -21,7 +27,3 @@ The original source code. `string` \| `null` The source code corresponding to the node, or null if not available. - -## Defined in - -[src/utils/javascript/helpers.ts:143](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/javascript/helpers.ts#L143) diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/functions/getNodeSourceRange.md b/docs/api/youtubei.js/namespaces/JsHelpers/functions/getNodeSourceRange.md new file mode 100644 index 00000000..4d5c4e26 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/functions/getNodeSourceRange.md @@ -0,0 +1,23 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / getNodeSourceRange + +# Function: getNodeSourceRange() + +> **getNodeSourceRange**(`node`): \[`number`, `number`\] \| `null` + +Defined in: [src/utils/javascript/helpers.ts:130](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L130) + +Returns the source range of an ESTree node as a tuple of start and end positions. + +## Parameters + +### node + +The ESTree node to extract the source range from. + +`Node` | `null` | `undefined` + +## Returns + +\[`number`, `number`\] \| `null` + +A tuple `[start, end]` representing the source range, or `null` if unavailable. diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/functions/memberBaseName.md b/docs/api/youtubei.js/namespaces/JsHelpers/functions/memberBaseName.md new file mode 100644 index 00000000..3c43c913 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/functions/memberBaseName.md @@ -0,0 +1,27 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / memberBaseName + +# Function: memberBaseName() + +> **memberBaseName**(`memberExpression`, `source`): `string` \| `null` + +Defined in: [src/utils/javascript/helpers.ts:193](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L193) + +Retrieves the base identifier for a member expression chain. + +## Parameters + +### memberExpression + +`MemberExpression` + +Member expression whose root should be resolved. + +### source + +`string` + +Original source code for range lookups. + +## Returns + +`string` \| `null` diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/functions/memberToString.md b/docs/api/youtubei.js/namespaces/JsHelpers/functions/memberToString.md new file mode 100644 index 00000000..edea1651 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/functions/memberToString.md @@ -0,0 +1,27 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / memberToString + +# Function: memberToString() + +> **memberToString**(`memberExpression`, `source`): `string` \| `null` + +Defined in: [src/utils/javascript/helpers.ts:153](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L153) + +Converts a member expression into its dot/bracket string form. + +## Parameters + +### memberExpression + +`Node` + +Member expression node to stringify. + +### source + +`string` + +Original source code for range lookups. + +## Returns + +`string` \| `null` diff --git a/docs/api/namespaces/JsHelpers/functions/walkAst.md b/docs/api/youtubei.js/namespaces/JsHelpers/functions/walkAst.md similarity index 54% rename from docs/api/namespaces/JsHelpers/functions/walkAst.md rename to docs/api/youtubei.js/namespaces/JsHelpers/functions/walkAst.md index aa7101ba..f2850993 100644 --- a/docs/api/namespaces/JsHelpers/functions/walkAst.md +++ b/docs/api/youtubei.js/namespaces/JsHelpers/functions/walkAst.md @@ -1,18 +1,24 @@ -[youtubei.js](../../../README.md) / [JsHelpers](../README.md) / walkAst +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / walkAst # Function: walkAst() > **walkAst**(`root`, `visitor`): `void` +Defined in: [src/utils/javascript/helpers.ts:62](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L62) + Performs a non-recursive traversal of an ESTree AST. ## Parameters -• **root**: `Node` +### root + +`Node` Root AST node to start the traversal from. -• **visitor**: [`AstVisitor`](../type-aliases/AstVisitor.md) +### visitor + +[`AstVisitor`](../type-aliases/AstVisitor.md) Callbacks invoked when nodes are entered or left. @@ -24,7 +30,3 @@ Callbacks invoked when nodes are entered or left. - If it returns `WALK_STOP`, the entire traversal is halted. - Why did I not use some AST walker library instead?: They're too slow. - -## Defined in - -[src/utils/javascript/helpers.ts:62](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/javascript/helpers.ts#L62) diff --git a/docs/api/namespaces/JsHelpers/interfaces/AstVisitObject.md b/docs/api/youtubei.js/namespaces/JsHelpers/interfaces/AstVisitObject.md similarity index 60% rename from docs/api/namespaces/JsHelpers/interfaces/AstVisitObject.md rename to docs/api/youtubei.js/namespaces/JsHelpers/interfaces/AstVisitObject.md index 5649c258..14792286 100644 --- a/docs/api/namespaces/JsHelpers/interfaces/AstVisitObject.md +++ b/docs/api/youtubei.js/namespaces/JsHelpers/interfaces/AstVisitObject.md @@ -1,26 +1,36 @@ -[youtubei.js](../../../README.md) / [JsHelpers](../README.md) / AstVisitObject +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / AstVisitObject # Interface: AstVisitObject +Defined in: [src/utils/javascript/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L28) + ## Methods ### enter()? > `optional` **enter**(`node`, `parent`, `ancestors`): [`AstVisitResult`](../type-aliases/AstVisitResult.md) +Defined in: [src/utils/javascript/helpers.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L39) + Callback invoked when an AST node is entered. #### Parameters -• **node**: `Node` +##### node + +`Node` Current AST node being visited. -• **parent**: `null` \| `Node` +##### parent Parent of the current AST node, or null if it's the root. -• **ancestors**: `Node`[] +`Node` | `null` + +##### ancestors + +`Node`[] Array of ancestor nodes, starting from the root down to the parent. @@ -32,29 +42,33 @@ Array of ancestor nodes, starting from the root down to the parent. - `WALK_STOP` to halt the entire traversal. - `void`/`undefined` to continue normal traversal. -#### Defined in - -[src/utils/javascript/helpers.ts:39](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/javascript/helpers.ts#L39) - *** ### leave()? > `optional` **leave**(`node`, `parent`, `ancestors`): [`AstVisitResult`](../type-aliases/AstVisitResult.md) +Defined in: [src/utils/javascript/helpers.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L49) + Callback invoked when an AST node is exited. #### Parameters -• **node**: `Node` +##### node + +`Node` Current AST node being exited. -• **parent**: `null` \| `Node` +##### parent Parent of the current AST node, or null if it's the root. -• **ancestors**: `Node`[] +`Node` | `null` + +##### ancestors + +`Node`[] Array of ancestor nodes, starting from the root down to the parent. @@ -64,7 +78,3 @@ Array of ancestor nodes, starting from the root down to the parent. - `WALK_STOP` to halt the entire traversal. - `void`/`undefined` to continue normal traversal. - -#### Defined in - -[src/utils/javascript/helpers.ts:49](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/javascript/helpers.ts#L49) diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitFn.md b/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitFn.md new file mode 100644 index 00000000..dc54ef40 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitFn.md @@ -0,0 +1,25 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / AstVisitFn + +# Type Alias: AstVisitFn() + +> **AstVisitFn** = (`node`, `parent`, `ancestors`) => [`AstVisitResult`](AstVisitResult.md) + +Defined in: [src/utils/javascript/helpers.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L26) + +## Parameters + +### node + +`ESTree.Node` + +### parent + +`ESTree.Node` | `null` + +### ancestors + +`ESTree.Node`[] + +## Returns + +[`AstVisitResult`](AstVisitResult.md) diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitResult.md b/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitResult.md new file mode 100644 index 00000000..f5dd7499 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitResult.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / AstVisitResult + +# Type Alias: AstVisitResult + +> **AstVisitResult** = `boolean` \| *typeof* [`WALK_STOP`](../variables/WALK_STOP.md) \| `void` + +Defined in: [src/utils/javascript/helpers.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L25) diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitor.md b/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitor.md new file mode 100644 index 00000000..8b18b913 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/type-aliases/AstVisitor.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / AstVisitor + +# Type Alias: AstVisitor + +> **AstVisitor** = [`AstVisitFn`](AstVisitFn.md) \| [`AstVisitObject`](../interfaces/AstVisitObject.md) + +Defined in: [src/utils/javascript/helpers.ts:52](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L52) diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/variables/WALK_STOP.md b/docs/api/youtubei.js/namespaces/JsHelpers/variables/WALK_STOP.md new file mode 100644 index 00000000..14f4901b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/variables/WALK_STOP.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / WALK\_STOP + +# Variable: WALK\_STOP + +> `const` **WALK\_STOP**: *typeof* `WALK_STOP` + +Defined in: [src/utils/javascript/helpers.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L4) diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/variables/indent.md b/docs/api/youtubei.js/namespaces/JsHelpers/variables/indent.md new file mode 100644 index 00000000..56ee4f60 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/variables/indent.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / indent + +# Variable: indent + +> `const` **indent**: `" "` = `' '` + +Defined in: [src/utils/javascript/helpers.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L23) diff --git a/docs/api/youtubei.js/namespaces/JsHelpers/variables/jsBuiltIns.md b/docs/api/youtubei.js/namespaces/JsHelpers/variables/jsBuiltIns.md new file mode 100644 index 00000000..2f288d64 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsHelpers/variables/jsBuiltIns.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [JsHelpers](../README.md) / jsBuiltIns + +# Variable: jsBuiltIns + +> `const` **jsBuiltIns**: `Set`\<`string`\> + +Defined in: [src/utils/javascript/helpers.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/helpers.ts#L6) diff --git a/docs/api/namespaces/JsMatchers/README.md b/docs/api/youtubei.js/namespaces/JsMatchers/README.md similarity index 67% rename from docs/api/namespaces/JsMatchers/README.md rename to docs/api/youtubei.js/namespaces/JsMatchers/README.md index cf7a1ae4..0b8a60ba 100644 --- a/docs/api/namespaces/JsMatchers/README.md +++ b/docs/api/youtubei.js/namespaces/JsMatchers/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / JsMatchers +[youtubei.js](../../../README.md) / JsMatchers # JsMatchers -## Index - -### Functions +## Functions - [nMatcher](functions/nMatcher.md) - [sigMatcher](functions/sigMatcher.md) diff --git a/docs/api/youtubei.js/namespaces/JsMatchers/functions/nMatcher.md b/docs/api/youtubei.js/namespaces/JsMatchers/functions/nMatcher.md new file mode 100644 index 00000000..bfb348c8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsMatchers/functions/nMatcher.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [JsMatchers](../README.md) / nMatcher + +# Function: nMatcher() + +> **nMatcher**(`node`): `false` \| `Identifier` + +Defined in: [src/utils/javascript/matchers.ts:53](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/matchers.ts#L53) + +## Parameters + +### node + +`Node` + +## Returns + +`false` \| `Identifier` diff --git a/docs/api/youtubei.js/namespaces/JsMatchers/functions/sigMatcher.md b/docs/api/youtubei.js/namespaces/JsMatchers/functions/sigMatcher.md new file mode 100644 index 00000000..4e4acab7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsMatchers/functions/sigMatcher.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [JsMatchers](../README.md) / sigMatcher + +# Function: sigMatcher() + +> **sigMatcher**(`node`): `false` \| `CallExpression` + +Defined in: [src/utils/javascript/matchers.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/matchers.ts#L4) + +## Parameters + +### node + +`Node` + +## Returns + +`false` \| `CallExpression` diff --git a/docs/api/youtubei.js/namespaces/JsMatchers/functions/timestampMatcher.md b/docs/api/youtubei.js/namespaces/JsMatchers/functions/timestampMatcher.md new file mode 100644 index 00000000..4a570396 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/JsMatchers/functions/timestampMatcher.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [JsMatchers](../README.md) / timestampMatcher + +# Function: timestampMatcher() + +> **timestampMatcher**(`node`): `boolean` + +Defined in: [src/utils/javascript/matchers.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/matchers.ts#L68) + +## Parameters + +### node + +`Node` + +## Returns + +`boolean` diff --git a/docs/api/namespaces/LZW/README.md b/docs/api/youtubei.js/namespaces/LZW/README.md similarity index 58% rename from docs/api/namespaces/LZW/README.md rename to docs/api/youtubei.js/namespaces/LZW/README.md index de4d5db8..1d87a9a7 100644 --- a/docs/api/namespaces/LZW/README.md +++ b/docs/api/youtubei.js/namespaces/LZW/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / LZW +[youtubei.js](../../../README.md) / LZW # LZW -## Index - -### Functions +## Functions - [compress](functions/compress.md) - [decompress](functions/decompress.md) diff --git a/docs/api/youtubei.js/namespaces/LZW/functions/compress.md b/docs/api/youtubei.js/namespaces/LZW/functions/compress.md new file mode 100644 index 00000000..94d5ae1e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/LZW/functions/compress.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [LZW](../README.md) / compress + +# Function: compress() + +> **compress**(`input`): `string` + +Defined in: [src/utils/LZW.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/LZW.ts#L5) + +Compresses a string using the LZW compression algorithm. + +## Parameters + +### input + +`string` + +The data to compress. + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/LZW/functions/decompress.md b/docs/api/youtubei.js/namespaces/LZW/functions/decompress.md new file mode 100644 index 00000000..7731d39b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/LZW/functions/decompress.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [LZW](../README.md) / decompress + +# Function: decompress() + +> **decompress**(`input`): `string` + +Defined in: [src/utils/LZW.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/LZW.ts#L40) + +Decompresses data that was compressed using the LZW compression algorithm. + +## Parameters + +### input + +`string` + +The data to be decompressed. + +## Returns + +`string` diff --git a/docs/api/namespaces/Log/README.md b/docs/api/youtubei.js/namespaces/Log/README.md similarity index 75% rename from docs/api/namespaces/Log/README.md rename to docs/api/youtubei.js/namespaces/Log/README.md index 773010df..54b41af1 100644 --- a/docs/api/namespaces/Log/README.md +++ b/docs/api/youtubei.js/namespaces/Log/README.md @@ -1,14 +1,12 @@ -[youtubei.js](../../README.md) / Log +[youtubei.js](../../../README.md) / Log # Log -## Index - -### Variables +## Variables - [Level](variables/Level.md) -### Functions +## Functions - [debug](functions/debug.md) - [error](functions/error.md) diff --git a/docs/api/youtubei.js/namespaces/Log/functions/debug.md b/docs/api/youtubei.js/namespaces/Log/functions/debug.md new file mode 100644 index 00000000..d2b5ccdb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Log/functions/debug.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Log](../README.md) / debug + +# Function: debug() + +> **debug**(`tag?`, ...`args?`): `void` + +Defined in: [src/utils/Log.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Log.ts#L44) + +## Parameters + +### tag? + +`string` + +### args? + +...`any`[] + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Log/functions/error.md b/docs/api/youtubei.js/namespaces/Log/functions/error.md new file mode 100644 index 00000000..ee33eb07 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Log/functions/error.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Log](../README.md) / error + +# Function: error() + +> **error**(`tag?`, ...`args?`): `void` + +Defined in: [src/utils/Log.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Log.ts#L42) + +## Parameters + +### tag? + +`string` + +### args? + +...`any`[] + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Log/functions/info.md b/docs/api/youtubei.js/namespaces/Log/functions/info.md new file mode 100644 index 00000000..ff69ed66 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Log/functions/info.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Log](../README.md) / info + +# Function: info() + +> **info**(`tag?`, ...`args?`): `void` + +Defined in: [src/utils/Log.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Log.ts#L43) + +## Parameters + +### tag? + +`string` + +### args? + +...`any`[] + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Log/functions/setLevel.md b/docs/api/youtubei.js/namespaces/Log/functions/setLevel.md new file mode 100644 index 00000000..12822be7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Log/functions/setLevel.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Log](../README.md) / setLevel + +# Function: setLevel() + +> **setLevel**(...`args`): `void` + +Defined in: [src/utils/Log.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Log.ts#L46) + +## Parameters + +### args + +...`number`[] + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Log/functions/warn.md b/docs/api/youtubei.js/namespaces/Log/functions/warn.md new file mode 100644 index 00000000..6b58a747 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Log/functions/warn.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Log](../README.md) / warn + +# Function: warn() + +> **warn**(`tag?`, ...`args?`): `void` + +Defined in: [src/utils/Log.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Log.ts#L41) + +## Parameters + +### tag? + +`string` + +### args? + +...`any`[] + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Log/functions/warnOnce.md b/docs/api/youtubei.js/namespaces/Log/functions/warnOnce.md new file mode 100644 index 00000000..6ab4ac94 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Log/functions/warnOnce.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Log](../README.md) / warnOnce + +# Function: warnOnce() + +> **warnOnce**(`id`, ...`args`): `void` + +Defined in: [src/utils/Log.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Log.ts#L33) + +## Parameters + +### id + +`string` + +### args + +...`any`[] + +## Returns + +`void` diff --git a/docs/api/namespaces/Log/variables/Level.md b/docs/api/youtubei.js/namespaces/Log/variables/Level.md similarity index 52% rename from docs/api/namespaces/Log/variables/Level.md rename to docs/api/youtubei.js/namespaces/Log/variables/Level.md index f0e74ade..0287f7c0 100644 --- a/docs/api/namespaces/Log/variables/Level.md +++ b/docs/api/youtubei.js/namespaces/Log/variables/Level.md @@ -1,10 +1,12 @@ -[youtubei.js](../../../README.md) / [Log](../README.md) / Level +[youtubei.js](../../../../README.md) / [Log](../README.md) / Level # Variable: Level > `const` **Level**: `object` -## Type declaration +Defined in: [src/utils/Log.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Log.ts#L3) + +## Type Declaration ### DEBUG @@ -25,7 +27,3 @@ ### WARNING > **WARNING**: `number` = `2` - -## Defined in - -[src/utils/Log.ts:3](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Log.ts#L3) diff --git a/docs/api/namespaces/Managers/README.md b/docs/api/youtubei.js/namespaces/Managers/README.md similarity index 71% rename from docs/api/namespaces/Managers/README.md rename to docs/api/youtubei.js/namespaces/Managers/README.md index f7ea7feb..8cc3e2a0 100644 --- a/docs/api/namespaces/Managers/README.md +++ b/docs/api/youtubei.js/namespaces/Managers/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / Managers +[youtubei.js](../../../README.md) / Managers # Managers -## Index - -### Classes +## Classes - [AccountManager](classes/AccountManager.md) - [InteractionManager](classes/InteractionManager.md) diff --git a/docs/api/youtubei.js/namespaces/Managers/classes/AccountManager.md b/docs/api/youtubei.js/namespaces/Managers/classes/AccountManager.md new file mode 100644 index 00000000..c86b4abb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Managers/classes/AccountManager.md @@ -0,0 +1,77 @@ +[youtubei.js](../../../../README.md) / [Managers](../README.md) / AccountManager + +# Class: AccountManager + +Defined in: [src/core/managers/AccountManager.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/AccountManager.ts#L10) + +## Constructors + +### Constructor + +> **new AccountManager**(`actions`): `AccountManager` + +Defined in: [src/core/managers/AccountManager.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/AccountManager.ts#L13) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`AccountManager` + +## Methods + +### getInfo() + +#### Call Signature + +> **getInfo**(`all`): `Promise`\<[`AccountItem`](../../YTNodes/classes/AccountItem.md)[]\> + +Defined in: [src/core/managers/AccountManager.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/AccountManager.ts#L20) + +Retrieves the list of channels belonging to the signed-in account. Only useful when signed in through cookie. If signed in through OAuth, you will get the active channel only. + +##### Parameters + +###### all + +`true` + +##### Returns + +`Promise`\<[`AccountItem`](../../YTNodes/classes/AccountItem.md)[]\> + +#### Call Signature + +> **getInfo**(`all?`): `Promise`\<[`AccountInfo`](../../YT/classes/AccountInfo.md)\> + +Defined in: [src/core/managers/AccountManager.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/AccountManager.ts#L24) + +Retrieves the active channel info for the signed-in account. Throws error if `on_behalf_of_user` was used to create the Innertube instance; use `getInfo(true)` instead. + +##### Parameters + +###### all? + +`false` + +##### Returns + +`Promise`\<[`AccountInfo`](../../YT/classes/AccountInfo.md)\> + +*** + +### getSettings() + +> **getSettings**(): `Promise`\<[`Settings`](../../YT/classes/Settings.md)\> + +Defined in: [src/core/managers/AccountManager.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/AccountManager.ts#L50) + +Gets YouTube settings. + +#### Returns + +`Promise`\<[`Settings`](../../YT/classes/Settings.md)\> diff --git a/docs/api/youtubei.js/namespaces/Managers/classes/InteractionManager.md b/docs/api/youtubei.js/namespaces/Managers/classes/InteractionManager.md new file mode 100644 index 00000000..d6e1fd56 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Managers/classes/InteractionManager.md @@ -0,0 +1,230 @@ +[youtubei.js](../../../../README.md) / [Managers](../README.md) / InteractionManager + +# Class: InteractionManager + +Defined in: [src/core/managers/InteractionManager.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L7) + +## Constructors + +### Constructor + +> **new InteractionManager**(`actions`): `InteractionManager` + +Defined in: [src/core/managers/InteractionManager.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L10) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`InteractionManager` + +## Methods + +### comment() + +> **comment**(`video_id`, `text`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/InteractionManager.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L119) + +Posts a comment on a given video. + +#### Parameters + +##### video\_id + +`string` + +The video ID + +##### text + +`string` + +The comment text + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### dislike() + +> **dislike**(`video_id`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/InteractionManager.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L38) + +Dislikes a given video. + +#### Parameters + +##### video\_id + +`string` + +The video ID + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### like() + +> **like**(`video_id`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/InteractionManager.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L18) + +Likes a given video. + +#### Parameters + +##### video\_id + +`string` + +The video ID + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### removeRating() + +> **removeRating**(`video_id`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/InteractionManager.ts:58](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L58) + +Removes a like/dislike. + +#### Parameters + +##### video\_id + +`string` + +The video ID + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### setNotificationPreferences() + +> **setNotificationPreferences**(`channel_id`, `type`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/InteractionManager.ts:174](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L174) + +Changes notification preferences for a given channel. +Only works with channels you are subscribed to. + +#### Parameters + +##### channel\_id + +`string` + +The channel ID. + +##### type + +The notification type. + +`"PERSONALIZED"` | `"ALL"` | `"NONE"` + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### subscribe() + +> **subscribe**(`channel_id`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/InteractionManager.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L78) + +Subscribes to the given channel. + +#### Parameters + +##### channel\_id + +`string` + +The channel ID + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### translate() + +> **translate**(`text`, `target_language`, `args`): `Promise`\<\{ `data`: [`IRawResponse`](../../../../interfaces/IRawResponse.md); `status_code`: `number`; `success`: `boolean`; `translated_content`: `any`; \}\> + +Defined in: [src/core/managers/InteractionManager.ts:151](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L151) + +Translates a given text using YouTube's comment translation feature. + +#### Parameters + +##### text + +`string` + +The text to translate + +##### target\_language + +`string` + +an ISO language code + +##### args + +optional arguments + +###### comment_id? + +`string` + +###### video_id? + +`string` + +#### Returns + +`Promise`\<\{ `data`: [`IRawResponse`](../../../../interfaces/IRawResponse.md); `status_code`: `number`; `success`: `boolean`; `translated_content`: `any`; \}\> + +*** + +### unsubscribe() + +> **unsubscribe**(`channel_id`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/InteractionManager.ts:98](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/InteractionManager.ts#L98) + +Unsubscribes from the given channel. + +#### Parameters + +##### channel\_id + +`string` + +The channel ID + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> diff --git a/docs/api/youtubei.js/namespaces/Managers/classes/PlaylistManager.md b/docs/api/youtubei.js/namespaces/Managers/classes/PlaylistManager.md new file mode 100644 index 00000000..bb531fec --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Managers/classes/PlaylistManager.md @@ -0,0 +1,269 @@ +[youtubei.js](../../../../README.md) / [Managers](../README.md) / PlaylistManager + +# Class: PlaylistManager + +Defined in: [src/core/managers/PlaylistManager.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L8) + +## Constructors + +### Constructor + +> **new PlaylistManager**(`actions`): `PlaylistManager` + +Defined in: [src/core/managers/PlaylistManager.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L11) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`PlaylistManager` + +## Methods + +### addToLibrary() + +> **addToLibrary**(`playlist_id`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/PlaylistManager.ts:73](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L73) + +Adds a given playlist to the library of a user. + +#### Parameters + +##### playlist\_id + +`string` + +The playlist ID. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### addVideos() + +> **addVideos**(`playlist_id`, `video_ids`): `Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +Defined in: [src/core/managers/PlaylistManager.ts:114](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L114) + +Adds videos to a given playlist. + +#### Parameters + +##### playlist\_id + +`string` + +The playlist ID. + +##### video\_ids + +`string`[] + +An array of video IDs to add to the playlist. + +#### Returns + +`Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +*** + +### create() + +> **create**(`title`, `video_ids`): `Promise`\<\{ `data`: `any`; `playlist_id?`: `string`; `status_code`: `number`; `success`: `boolean`; \}\> + +Defined in: [src/core/managers/PlaylistManager.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L20) + +Creates a playlist. + +#### Parameters + +##### title + +`string` + +The title of the playlist. + +##### video\_ids + +`string`[] + +An array of video IDs to add to the playlist. + +#### Returns + +`Promise`\<\{ `data`: `any`; `playlist_id?`: `string`; `status_code`: `number`; `success`: `boolean`; \}\> + +*** + +### delete() + +> **delete**(`playlist_id`): `Promise`\<\{ `data`: `any`; `playlist_id`: `string`; `status_code`: `number`; `success`: `boolean`; \}\> + +Defined in: [src/core/managers/PlaylistManager.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L47) + +Deletes a given playlist. + +#### Parameters + +##### playlist\_id + +`string` + +The playlist ID. + +#### Returns + +`Promise`\<\{ `data`: `any`; `playlist_id`: `string`; `status_code`: `number`; `success`: `boolean`; \}\> + +*** + +### moveVideo() + +> **moveVideo**(`playlist_id`, `moved_video_id`, `predecessor_video_id`): `Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +Defined in: [src/core/managers/PlaylistManager.ts:194](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L194) + +Moves a video to a new position within a given playlist. + +#### Parameters + +##### playlist\_id + +`string` + +The playlist ID. + +##### moved\_video\_id + +`string` + +The video ID to move. + +##### predecessor\_video\_id + +`string` + +The video ID to move the moved video before. + +#### Returns + +`Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +*** + +### removeFromLibrary() + +> **removeFromLibrary**(`playlist_id`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/core/managers/PlaylistManager.ts:93](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L93) + +Remove a given playlist to the library of a user. + +#### Parameters + +##### playlist\_id + +`string` + +The playlist ID. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### removeVideos() + +> **removeVideos**(`playlist_id`, `video_ids`, `use_set_video_ids`): `Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +Defined in: [src/core/managers/PlaylistManager.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L144) + +Removes videos from a given playlist. + +#### Parameters + +##### playlist\_id + +`string` + +The playlist ID. + +##### video\_ids + +`string`[] + +An array of video IDs to remove from the playlist. + +##### use\_set\_video\_ids + +`boolean` = `false` + +Option to remove videos using set video IDs. + +#### Returns + +`Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +*** + +### setDescription() + +> **setDescription**(`playlist_id`, `description`): `Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +Defined in: [src/core/managers/PlaylistManager.ts:282](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L282) + +Sets the description for the given playlist. + +#### Parameters + +##### playlist\_id + +`string` + +The playlist ID. + +##### description + +`string` + +The description to use for the playlist. + +#### Returns + +`Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +*** + +### setName() + +> **setName**(`playlist_id`, `name`): `Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> + +Defined in: [src/core/managers/PlaylistManager.ts:255](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/managers/PlaylistManager.ts#L255) + +Sets the name for the given playlist. + +#### Parameters + +##### playlist\_id + +`string` + +The playlist ID. + +##### name + +`string` + +The name / title to use for the playlist. + +#### Returns + +`Promise`\<\{ `action_result`: `any`; `playlist_id`: `string`; \}\> diff --git a/docs/api/namespaces/Misc/README.md b/docs/api/youtubei.js/namespaces/Misc/README.md similarity index 90% rename from docs/api/namespaces/Misc/README.md rename to docs/api/youtubei.js/namespaces/Misc/README.md index 04f5e7e4..049ae37c 100644 --- a/docs/api/namespaces/Misc/README.md +++ b/docs/api/youtubei.js/namespaces/Misc/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / Misc +[youtubei.js](../../../README.md) / Misc # Misc -## Index - -### Classes +## Classes - [AccessibilityContext](classes/AccessibilityContext.md) - [AccessibilityData](classes/AccessibilityData.md) diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/AccessibilityContext.md b/docs/api/youtubei.js/namespaces/Misc/classes/AccessibilityContext.md new file mode 100644 index 00000000..56db6a62 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/AccessibilityContext.md @@ -0,0 +1,31 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / AccessibilityContext + +# Class: AccessibilityContext + +Defined in: [src/parser/classes/misc/AccessibilityContext.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/AccessibilityContext.ts#L3) + +## Constructors + +### Constructor + +> **new AccessibilityContext**(`data`): `AccessibilityContext` + +Defined in: [src/parser/classes/misc/AccessibilityContext.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/AccessibilityContext.ts#L6) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AccessibilityContext` + +## Properties + +### label + +> **label**: `string` + +Defined in: [src/parser/classes/misc/AccessibilityContext.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/AccessibilityContext.ts#L4) diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/AccessibilityData.md b/docs/api/youtubei.js/namespaces/Misc/classes/AccessibilityData.md new file mode 100644 index 00000000..5322ad60 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/AccessibilityData.md @@ -0,0 +1,47 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / AccessibilityData + +# Class: AccessibilityData + +Defined in: [src/parser/classes/misc/AccessibilityData.ts:115](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/AccessibilityData.ts#L115) + +## Constructors + +### Constructor + +> **new AccessibilityData**(`data`): `AccessibilityData` + +Defined in: [src/parser/classes/misc/AccessibilityData.ts:120](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/AccessibilityData.ts#L120) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AccessibilityData` + +## Properties + +### accessibility\_identifier? + +> `optional` **accessibility\_identifier**: `string` + +Defined in: [src/parser/classes/misc/AccessibilityData.ts:116](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/AccessibilityData.ts#L116) + +*** + +### identifier? + +> `optional` **identifier**: `AccessibilityId` + +Defined in: [src/parser/classes/misc/AccessibilityData.ts:117](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/AccessibilityData.ts#L117) + +*** + +### label? + +> `optional` **label**: `string` + +Defined in: [src/parser/classes/misc/AccessibilityData.ts:118](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/AccessibilityData.ts#L118) diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/Author.md b/docs/api/youtubei.js/namespaces/Misc/classes/Author.md new file mode 100644 index 00000000..a06ddf4e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/Author.md @@ -0,0 +1,121 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / Author + +# Class: Author + +Defined in: [src/parser/classes/misc/Author.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L10) + +## Constructors + +### Constructor + +> **new Author**(`item`, `badges?`, `thumbs?`, `id?`): `Author` + +Defined in: [src/parser/classes/misc/Author.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L21) + +#### Parameters + +##### item + +[`RawNode`](../../../../type-aliases/RawNode.md) + +##### badges? + +`any` + +##### thumbs? + +`any` + +##### id? + +`string` + +#### Returns + +`Author` + +## Properties + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/misc/Author.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L15) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/Author.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L14) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/misc/Author.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L11) + +*** + +### is\_moderator? + +> `optional` **is\_moderator**: `boolean` + +Defined in: [src/parser/classes/misc/Author.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L16) + +*** + +### is\_verified? + +> `optional` **is\_verified**: `boolean` + +Defined in: [src/parser/classes/misc/Author.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L17) + +*** + +### is\_verified\_artist? + +> `optional` **is\_verified\_artist**: `boolean` + +Defined in: [src/parser/classes/misc/Author.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L18) + +*** + +### name + +> **name**: `string` + +Defined in: [src/parser/classes/misc/Author.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L12) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](Thumbnail.md)[] + +Defined in: [src/parser/classes/misc/Author.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L13) + +*** + +### url + +> **url**: `string` + +Defined in: [src/parser/classes/misc/Author.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L19) + +## Accessors + +### best\_thumbnail + +#### Get Signature + +> **get** **best\_thumbnail**(): [`Thumbnail`](Thumbnail.md) \| `undefined` + +Defined in: [src/parser/classes/misc/Author.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Author.ts#L51) + +##### Returns + +[`Thumbnail`](Thumbnail.md) \| `undefined` diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/ChildElement.md b/docs/api/youtubei.js/namespaces/Misc/classes/ChildElement.md new file mode 100644 index 00000000..c38e5e58 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/ChildElement.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / ChildElement + +# Class: ChildElement + +Defined in: [src/parser/classes/misc/ChildElement.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/ChildElement.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChildElement**(`data`): `ChildElement` + +Defined in: [src/parser/classes/misc/ChildElement.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/ChildElement.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChildElement` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### child\_elements? + +> `optional` **child\_elements**: `ChildElement`[] + +Defined in: [src/parser/classes/misc/ChildElement.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/ChildElement.ts#L9) + +*** + +### properties + +> **properties**: `any` + +Defined in: [src/parser/classes/misc/ChildElement.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/ChildElement.ts#L8) + +*** + +### text? + +> `optional` **text**: `string` + +Defined in: [src/parser/classes/misc/ChildElement.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/ChildElement.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChildElement'` + +Defined in: [src/parser/classes/misc/ChildElement.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/ChildElement.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChildElement & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChildElement & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/CommandContext.md b/docs/api/youtubei.js/namespaces/Misc/classes/CommandContext.md new file mode 100644 index 00000000..773fd2c7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/CommandContext.md @@ -0,0 +1,103 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / CommandContext + +# Class: CommandContext + +Defined in: [src/parser/classes/misc/CommandContext.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L4) + +## Constructors + +### Constructor + +> **new CommandContext**(`data`): `CommandContext` + +Defined in: [src/parser/classes/misc/CommandContext.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommandContext` + +## Properties + +### on\_first\_visible? + +> `optional` **on\_first\_visible**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L13) + +*** + +### on\_focus? + +> `optional` **on\_focus**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L5) + +*** + +### on\_hidden? + +> `optional` **on\_hidden**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L6) + +*** + +### on\_hover? + +> `optional` **on\_hover**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L14) + +*** + +### on\_long\_press? + +> `optional` **on\_long\_press**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L9) + +*** + +### on\_tap? + +> `optional` **on\_tap**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L10) + +*** + +### on\_touch\_end? + +> `optional` **on\_touch\_end**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L7) + +*** + +### on\_touch\_move? + +> `optional` **on\_touch\_move**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L8) + +*** + +### on\_touch\_start? + +> `optional` **on\_touch\_start**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L11) + +*** + +### on\_visible? + +> `optional` **on\_visible**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/CommandContext.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/CommandContext.ts#L12) diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/EmojiRun.md b/docs/api/youtubei.js/namespaces/Misc/classes/EmojiRun.md new file mode 100644 index 00000000..2d96e7af --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/EmojiRun.md @@ -0,0 +1,79 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / EmojiRun + +# Class: EmojiRun + +Defined in: [src/parser/classes/misc/EmojiRun.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/EmojiRun.ts#L13) + +## Implements + +- `Run` + +## Constructors + +### Constructor + +> **new EmojiRun**(`data`): `EmojiRun` + +Defined in: [src/parser/classes/misc/EmojiRun.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/EmojiRun.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EmojiRun` + +## Properties + +### emoji + +> **emoji**: `Emoji` + +Defined in: [src/parser/classes/misc/EmojiRun.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/EmojiRun.ts#L15) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/misc/EmojiRun.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/EmojiRun.ts#L14) + +#### Implementation of + +`Run.text` + +## Methods + +### toHTML() + +> **toHTML**(): `string` + +Defined in: [src/parser/classes/misc/EmojiRun.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/EmojiRun.ts#L37) + +#### Returns + +`string` + +#### Implementation of + +`Run.toHTML` + +*** + +### toString() + +> **toString**(): `string` + +Defined in: [src/parser/classes/misc/EmojiRun.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/EmojiRun.ts#L33) + +#### Returns + +`string` + +#### Implementation of + +`Run.toString` diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/Format.md b/docs/api/youtubei.js/namespaces/Misc/classes/Format.md new file mode 100644 index 00000000..2fa77660 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/Format.md @@ -0,0 +1,435 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / Format + +# Class: Format + +Defined in: [src/parser/classes/misc/Format.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L35) + +## Constructors + +### Constructor + +> **new Format**(`data`, `this_response_nsig_cache?`): `Format` + +Defined in: [src/parser/classes/misc/Format.ts:87](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L87) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +##### this\_response\_nsig\_cache? + +`Map`\<`string`, `string`\> + +#### Returns + +`Format` + +## Properties + +### approx\_duration\_ms + +> **approx\_duration\_ms**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:60](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L60) + +*** + +### audio\_channels? + +> `optional` **audio\_channels**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:62](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L62) + +*** + +### audio\_quality? + +> `optional` **audio\_quality**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:59](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L59) + +*** + +### audio\_sample\_rate? + +> `optional` **audio\_sample\_rate**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:61](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L61) + +*** + +### audio\_track? + +> `optional` **audio\_track**: `AudioTrack` + +Defined in: [src/parser/classes/misc/Format.ts:74](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L74) + +*** + +### average\_bitrate? + +> `optional` **average\_bitrate**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L51) + +*** + +### bitrate + +> **bitrate**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:52](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L52) + +*** + +### caption\_track? + +> `optional` **caption\_track**: `CaptionTrack` + +Defined in: [src/parser/classes/misc/Format.ts:85](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L85) + +*** + +### cipher? + +> `optional` **cipher**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:73](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L73) + +*** + +### color\_info? + +> `optional` **color\_info**: `ColorInfo` + +Defined in: [src/parser/classes/misc/Format.ts:84](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L84) + +*** + +### content\_length? + +> `optional` **content\_length**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L44) + +*** + +### distinct\_params? + +> `optional` **distinct\_params**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L67) + +*** + +### drm\_families? + +> `optional` **drm\_families**: `string`[] + +Defined in: [src/parser/classes/misc/Format.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L47) + +*** + +### drm\_track\_type? + +> `optional` **drm\_track\_type**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:66](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L66) + +*** + +### fair\_play\_key\_uri? + +> `optional` **fair\_play\_key\_uri**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L55) + +*** + +### fps? + +> `optional` **fps**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:48](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L48) + +*** + +### has\_audio + +> **has\_audio**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:75](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L75) + +*** + +### has\_text + +> **has\_text**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:77](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L77) + +*** + +### has\_video + +> **has\_video**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:76](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L76) + +*** + +### height? + +> `optional` **height**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L41) + +*** + +### high\_replication? + +> `optional` **high\_replication**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:58](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L58) + +*** + +### index\_range? + +> `optional` **index\_range**: `Range` + +Defined in: [src/parser/classes/misc/Format.ts:72](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L72) + +*** + +### init\_range? + +> `optional` **init\_range**: `Range` + +Defined in: [src/parser/classes/misc/Format.ts:71](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L71) + +*** + +### is\_auto\_dubbed? + +> `optional` **is\_auto\_dubbed**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:80](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L80) + +*** + +### is\_descriptive? + +> `optional` **is\_descriptive**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:81](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L81) + +*** + +### is\_drc? + +> `optional` **is\_drc**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:65](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L65) + +*** + +### is\_dubbed? + +> `optional` **is\_dubbed**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:79](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L79) + +*** + +### is\_original? + +> `optional` **is\_original**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:83](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L83) + +*** + +### is\_secondary? + +> `optional` **is\_secondary**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:82](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L82) + +*** + +### is\_type\_otf + +> **is\_type\_otf**: `boolean` + +Defined in: [src/parser/classes/misc/Format.ts:70](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L70) + +*** + +### itag + +> **itag**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L38) + +*** + +### language? + +> `optional` **language**: `string` \| `null` + +Defined in: [src/parser/classes/misc/Format.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L78) + +*** + +### last\_modified + +> **last\_modified**: `Date` + +Defined in: [src/parser/classes/misc/Format.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L42) + +*** + +### last\_modified\_ms + +> **last\_modified\_ms**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L43) + +*** + +### loudness\_db? + +> `optional` **loudness\_db**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:63](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L63) + +*** + +### max\_dvr\_duration\_sec? + +> `optional` **max\_dvr\_duration\_sec**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:57](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L57) + +*** + +### mime\_type + +> **mime\_type**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L69) + +*** + +### projection\_type? + +> `optional` **projection\_type**: `ProjectionType` + +Defined in: [src/parser/classes/misc/Format.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L50) + +*** + +### quality? + +> `optional` **quality**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L45) + +*** + +### quality\_label? + +> `optional` **quality\_label**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L49) + +*** + +### signature\_cipher? + +> `optional` **signature\_cipher**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L64) + +*** + +### spatial\_audio\_type? + +> `optional` **spatial\_audio\_type**: `SpatialAudioType` + +Defined in: [src/parser/classes/misc/Format.ts:53](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L53) + +*** + +### stereo\_layout? + +> `optional` **stereo\_layout**: `StereoLayout` + +Defined in: [src/parser/classes/misc/Format.ts:56](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L56) + +*** + +### target\_duration\_dec? + +> `optional` **target\_duration\_dec**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L54) + +*** + +### track\_absolute\_loudness\_lkfs? + +> `optional` **track\_absolute\_loudness\_lkfs**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L68) + +*** + +### url? + +> `optional` **url**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L39) + +*** + +### width? + +> `optional` **width**: `number` + +Defined in: [src/parser/classes/misc/Format.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L40) + +*** + +### xtags? + +> `optional` **xtags**: `string` + +Defined in: [src/parser/classes/misc/Format.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L46) + +## Methods + +### decipher() + +> **decipher**(`player?`): `Promise`\<`string`\> + +Defined in: [src/parser/classes/misc/Format.ts:245](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Format.ts#L245) + +Deciphers the URL using the provided player instance. + +#### Parameters + +##### player? + +[`Player`](../../../../classes/Player.md) + +An optional instance of the Player class used to decipher the URL. + +#### Returns + +`Promise`\<`string`\> + +The deciphered URL as a string. If no player is provided, returns the original URL or an empty string. diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/RendererContext.md b/docs/api/youtubei.js/namespaces/Misc/classes/RendererContext.md new file mode 100644 index 00000000..1ef952f0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/RendererContext.md @@ -0,0 +1,39 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / RendererContext + +# Class: RendererContext + +Defined in: [src/parser/classes/misc/RendererContext.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/RendererContext.ts#L5) + +## Constructors + +### Constructor + +> **new RendererContext**(`data?`): `RendererContext` + +Defined in: [src/parser/classes/misc/RendererContext.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/RendererContext.ts#L9) + +#### Parameters + +##### data? + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RendererContext` + +## Properties + +### accessibility\_context? + +> `optional` **accessibility\_context**: [`AccessibilityContext`](AccessibilityContext.md) + +Defined in: [src/parser/classes/misc/RendererContext.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/RendererContext.ts#L7) + +*** + +### command\_context? + +> `optional` **command\_context**: [`CommandContext`](CommandContext.md) + +Defined in: [src/parser/classes/misc/RendererContext.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/RendererContext.ts#L6) diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/SubscriptionButton.md b/docs/api/youtubei.js/namespaces/Misc/classes/SubscriptionButton.md new file mode 100644 index 00000000..46879caa --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/SubscriptionButton.md @@ -0,0 +1,55 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / SubscriptionButton + +# Class: SubscriptionButton + +Defined in: [src/parser/classes/misc/SubscriptionButton.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/SubscriptionButton.ts#L4) + +## Constructors + +### Constructor + +> **new SubscriptionButton**(`data`): `SubscriptionButton` + +Defined in: [src/parser/classes/misc/SubscriptionButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/SubscriptionButton.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SubscriptionButton` + +## Properties + +### subscribed + +> **subscribed**: `boolean` + +Defined in: [src/parser/classes/misc/SubscriptionButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/SubscriptionButton.ts#L8) + +*** + +### subscription\_type? + +> `optional` **subscription\_type**: `"FREE"` \| `"PAID"` \| `"UNAVAILABLE"` + +Defined in: [src/parser/classes/misc/SubscriptionButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/SubscriptionButton.ts#L9) + +*** + +### text + +> **text**: [`Text`](Text.md) + +Defined in: [src/parser/classes/misc/SubscriptionButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/SubscriptionButton.ts#L7) + +*** + +### type + +> `static` **type**: `string` = `'SubscriptionButton'` + +Defined in: [src/parser/classes/misc/SubscriptionButton.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/SubscriptionButton.ts#L5) diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/Text.md b/docs/api/youtubei.js/namespaces/Misc/classes/Text.md new file mode 100644 index 00000000..097a7ae7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/Text.md @@ -0,0 +1,141 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / Text + +# Class: Text + +Defined in: [src/parser/classes/misc/Text.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L34) + +Represents text content that may include formatting, emojis, and navigation endpoints. + +## Constructors + +### Constructor + +> **new Text**(`data`): `Text` + +Defined in: [src/parser/classes/misc/Text.ts:60](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L60) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Text` + +## Properties + +### accessibility? + +> `optional` **accessibility**: `FormattedStringSupportedAccessibilityDatas` + +Defined in: [src/parser/classes/misc/Text.ts:53](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L53) + +Accessibility data associated with this text. + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/Text.ts:48](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L48) + +Navigation endpoint associated with this text. + +*** + +### rtl + +> **rtl**: `boolean` + +Defined in: [src/parser/classes/misc/Text.ts:58](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L58) + +Indicates if the text is right-to-left. + +*** + +### runs? + +> `optional` **runs**: ([`TextRun`](TextRun.md) \| [`EmojiRun`](EmojiRun.md))[] + +Defined in: [src/parser/classes/misc/Text.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L43) + +Individual text segments with their formatting. + +*** + +### text? + +> `optional` **text**: `string` + +Defined in: [src/parser/classes/misc/Text.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L38) + +The plain text content. + +## Methods + +### isEmpty() + +> **isEmpty**(): `boolean` + +Defined in: [src/parser/classes/misc/Text.ts:262](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L262) + +Checks if the text is empty. + +#### Returns + +`boolean` + +Whether the text is empty. + +*** + +### toHTML() + +> **toHTML**(): `string` \| `undefined` + +Defined in: [src/parser/classes/misc/Text.ts:254](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L254) + +Converts the text to HTML. + +#### Returns + +`string` \| `undefined` + +The HTML. + +*** + +### toString() + +> **toString**(): `string` + +Defined in: [src/parser/classes/misc/Text.ts:270](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L270) + +Converts the text to a string. + +#### Returns + +`string` + +The text. + +*** + +### fromAttributed() + +> `static` **fromAttributed**(`data`): `Text` + +Defined in: [src/parser/classes/misc/Text.ts:103](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Text.ts#L103) + +#### Parameters + +##### data + +`AttributedText` + +#### Returns + +`Text` diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/TextRun.md b/docs/api/youtubei.js/namespaces/Misc/classes/TextRun.md new file mode 100644 index 00000000..921db47d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/TextRun.md @@ -0,0 +1,167 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / TextRun + +# Class: TextRun + +Defined in: [src/parser/classes/misc/TextRun.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L5) + +## Implements + +- `Run` + +## Constructors + +### Constructor + +> **new TextRun**(`data`): `TextRun` + +Defined in: [src/parser/classes/misc/TextRun.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L32) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TextRun` + +## Properties + +### attachment + +> **attachment**: `any` + +Defined in: [src/parser/classes/misc/TextRun.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L30) + +*** + +### bold + +> **bold**: `boolean` + +Defined in: [src/parser/classes/misc/TextRun.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L9) + +*** + +### bracket + +> **bracket**: `boolean` + +Defined in: [src/parser/classes/misc/TextRun.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L10) + +*** + +### dark\_mode\_text\_color? + +> `optional` **dark\_mode\_text\_color**: `number` + +Defined in: [src/parser/classes/misc/TextRun.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L11) + +*** + +### deemphasize + +> **deemphasize**: `boolean` + +Defined in: [src/parser/classes/misc/TextRun.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L12) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/classes/misc/TextRun.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L8) + +*** + +### error\_underline + +> **error\_underline**: `boolean` + +Defined in: [src/parser/classes/misc/TextRun.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L15) + +*** + +### font\_face? + +> `optional` **font\_face**: `"FONT_FACE_UNKNOWN"` \| `"FONT_FACE_YT_SANS_MEDIUM"` \| `"FONT_FACE_ROBOTO_MEDIUM"` \| `"FONT_FACE_YOUTUBE_SANS_LIGHT"` \| `"FONT_FACE_YOUTUBE_SANS_REGULAR"` \| `"FONT_FACE_YOUTUBE_SANS_MEDIUM"` \| `"FONT_FACE_YOUTUBE_SANS_SEMIBOLD"` \| `"FONT_FACE_YOUTUBE_SANS_BOLD"` \| `"FONT_FACE_YOUTUBE_SANS_EXTRABOLD"` \| `"FONT_FACE_YOUTUBE_SANS_BLACK"` \| `"FONT_FACE_YT_SANS_BOLD"` \| `"FONT_FACE_ROBOTO_REGULAR"` + +Defined in: [src/parser/classes/misc/TextRun.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L17) + +*** + +### italics + +> **italics**: `boolean` + +Defined in: [src/parser/classes/misc/TextRun.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L13) + +*** + +### strikethrough + +> **strikethrough**: `boolean` + +Defined in: [src/parser/classes/misc/TextRun.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L14) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/misc/TextRun.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L6) + +#### Implementation of + +`Run.text` + +*** + +### text\_color? + +> `optional` **text\_color**: `number` + +Defined in: [src/parser/classes/misc/TextRun.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L7) + +*** + +### underline + +> **underline**: `boolean` + +Defined in: [src/parser/classes/misc/TextRun.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L16) + +## Methods + +### toHTML() + +> **toHTML**(): `string` + +Defined in: [src/parser/classes/misc/TextRun.ts:65](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L65) + +#### Returns + +`string` + +#### Implementation of + +`Run.toHTML` + +*** + +### toString() + +> **toString**(): `string` + +Defined in: [src/parser/classes/misc/TextRun.ts:61](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/TextRun.ts#L61) + +#### Returns + +`string` + +#### Implementation of + +`Run.toString` diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/Thumbnail.md b/docs/api/youtubei.js/namespaces/Misc/classes/Thumbnail.md new file mode 100644 index 00000000..56a39f6a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/Thumbnail.md @@ -0,0 +1,67 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / Thumbnail + +# Class: Thumbnail + +Defined in: [src/parser/classes/misc/Thumbnail.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Thumbnail.ts#L3) + +## Constructors + +### Constructor + +> **new Thumbnail**(`data`): `Thumbnail` + +Defined in: [src/parser/classes/misc/Thumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Thumbnail.ts#L8) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Thumbnail` + +## Properties + +### height + +> **height**: `number` + +Defined in: [src/parser/classes/misc/Thumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Thumbnail.ts#L6) + +*** + +### url + +> **url**: `string` + +Defined in: [src/parser/classes/misc/Thumbnail.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Thumbnail.ts#L4) + +*** + +### width + +> **width**: `number` + +Defined in: [src/parser/classes/misc/Thumbnail.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Thumbnail.ts#L5) + +## Methods + +### fromResponse() + +> `static` **fromResponse**(`data`): `Thumbnail`[] + +Defined in: [src/parser/classes/misc/Thumbnail.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/Thumbnail.ts#L17) + +Get thumbnails from response object. + +#### Parameters + +##### data + +`any` + +#### Returns + +`Thumbnail`[] diff --git a/docs/api/youtubei.js/namespaces/Misc/classes/VideoDetails.md b/docs/api/youtubei.js/namespaces/Misc/classes/VideoDetails.md new file mode 100644 index 00000000..3f753909 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Misc/classes/VideoDetails.md @@ -0,0 +1,183 @@ +[youtubei.js](../../../../README.md) / [Misc](../README.md) / VideoDetails + +# Class: VideoDetails + +Defined in: [src/parser/classes/misc/VideoDetails.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L4) + +## Constructors + +### Constructor + +> **new VideoDetails**(`data`): `VideoDetails` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoDetails` + +## Properties + +### allow\_ratings + +> **allow\_ratings**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L13) + +*** + +### author + +> **author**: `string` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L15) + +*** + +### channel\_id + +> **channel\_id**: `string` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L6) + +*** + +### duration + +> **duration**: `number` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L8) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L5) + +*** + +### is\_crawlable + +> **is\_crawlable**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L21) + +*** + +### is\_live + +> **is\_live**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L17) + +*** + +### is\_live\_content + +> **is\_live\_content**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L18) + +*** + +### is\_live\_dvr\_enabled + +> **is\_live\_dvr\_enabled**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L19) + +*** + +### is\_low\_latency\_live\_stream + +> **is\_low\_latency\_live\_stream**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L23) + +*** + +### is\_owner\_viewing + +> **is\_owner\_viewing**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L10) + +*** + +### is\_post\_live\_dvr + +> **is\_post\_live\_dvr**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L22) + +*** + +### is\_private + +> **is\_private**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L16) + +*** + +### is\_upcoming + +> **is\_upcoming**: `boolean` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L20) + +*** + +### keywords + +> **keywords**: `string`[] + +Defined in: [src/parser/classes/misc/VideoDetails.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L9) + +*** + +### live\_chunk\_readahead? + +> `optional` **live\_chunk\_readahead**: `number` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L24) + +*** + +### short\_description + +> **short\_description**: `string` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L11) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](Thumbnail.md)[] + +Defined in: [src/parser/classes/misc/VideoDetails.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L12) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L7) + +*** + +### view\_count + +> **view\_count**: `number` + +Defined in: [src/parser/classes/misc/VideoDetails.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/misc/VideoDetails.ts#L14) diff --git a/docs/api/namespaces/Mixins/README.md b/docs/api/youtubei.js/namespaces/Mixins/README.md similarity index 71% rename from docs/api/namespaces/Mixins/README.md rename to docs/api/youtubei.js/namespaces/Mixins/README.md index cdd24192..87fda324 100644 --- a/docs/api/namespaces/Mixins/README.md +++ b/docs/api/youtubei.js/namespaces/Mixins/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / Mixins +[youtubei.js](../../../README.md) / Mixins # Mixins -## Index - -### Classes +## Classes - [Feed](classes/Feed.md) - [FilterableFeed](classes/FilterableFeed.md) diff --git a/docs/api/youtubei.js/namespaces/Mixins/classes/Feed.md b/docs/api/youtubei.js/namespaces/Mixins/classes/Feed.md new file mode 100644 index 00000000..1297f0c6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Mixins/classes/Feed.md @@ -0,0 +1,310 @@ +[youtubei.js](../../../../README.md) / [Mixins](../README.md) / Feed + +# Class: Feed\ + +Defined in: [src/core/mixins/Feed.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L40) + +## Extended by + +- [`ChannelListContinuation`](../../YT/classes/ChannelListContinuation.md) +- [`FilterableFeed`](FilterableFeed.md) +- [`TabbedFeed`](TabbedFeed.md) +- [`History`](../../YT/classes/History.md) +- [`Library`](../../YT/classes/Library.md) +- [`Playlist`](../../YT/classes/Playlist.md) +- [`Search`](../../YT/classes/Search.md) +- [`Channel`](../../YTKids/classes/Channel.md) +- [`HomeFeed`](../../YTKids/classes/HomeFeed.md) +- [`Search`](../../YTKids/classes/Search.md) + +## Type Parameters + +### T + +`T` *extends* [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) = [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +## Constructors + +### Constructor + +> **new Feed**\<`T`\>(`actions`, `response`, `already_parsed`): `Feed`\<`T`\> + +Defined in: [src/core/mixins/Feed.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L47) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### response + +[`IParsedResponse`](../../../../interfaces/IParsedResponse.md) | [`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`Feed`\<`T`\> + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`Feed`\<`T`\>\> + +Defined in: [src/core/mixins/Feed.ts:219](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L219) + +Retrieves next batch of contents and returns a new Feed object. + +#### Returns + +`Promise`\<`Feed`\<`T`\>\> + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<`T` \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<`T` \| `undefined`\> + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> diff --git a/docs/api/youtubei.js/namespaces/Mixins/classes/FilterableFeed.md b/docs/api/youtubei.js/namespaces/Mixins/classes/FilterableFeed.md new file mode 100644 index 00000000..f8cd5527 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Mixins/classes/FilterableFeed.md @@ -0,0 +1,427 @@ +[youtubei.js](../../../../README.md) / [Mixins](../README.md) / FilterableFeed + +# Class: FilterableFeed\ + +Defined in: [src/core/mixins/FilterableFeed.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L10) + +## Extends + +- [`Feed`](Feed.md)\<`T`\> + +## Extended by + +- [`FilteredChannelList`](../../YT/classes/FilteredChannelList.md) +- [`HomeFeed`](../../YT/classes/HomeFeed.md) +- [`HashtagFeed`](../../YT/classes/HashtagFeed.md) + +## Type Parameters + +### T + +`T` *extends* [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +## Constructors + +### Constructor + +> **new FilterableFeed**\<`T`\>(`actions`, `data`, `already_parsed`): `FilterableFeed`\<`T`\> + +Defined in: [src/core/mixins/FilterableFeed.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L13) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | `T` + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`FilterableFeed`\<`T`\> + +#### Overrides + +[`Feed`](Feed.md).[`constructor`](Feed.md#constructor) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](Feed.md).[`actions`](Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`channels`](Feed.md#channels) + +*** + +### filter\_chips + +#### Get Signature + +> **get** **filter\_chips**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md)\> + +Defined in: [src/core/mixins/FilterableFeed.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L20) + +Returns the filter chips. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md)\> + +*** + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/core/mixins/FilterableFeed.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L38) + +Returns available filters. + +##### Returns + +`string`[] + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`Feed`](Feed.md).[`has_continuation`](Feed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](Feed.md).[`memo`](Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](Feed.md).[`page`](Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](Feed.md).[`page_contents`](Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`playlists`](Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`posts`](Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](Feed.md).[`secondary_contents`](Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`shelves`](Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`videos`](Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<[`Feed`](Feed.md)\<`T`\>\> + +Defined in: [src/core/mixins/Feed.ts:219](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L219) + +Retrieves next batch of contents and returns a new [Feed](Feed.md) object. + +#### Returns + +`Promise`\<[`Feed`](Feed.md)\<`T`\>\> + +#### Inherited from + +[`Feed`](Feed.md).[`getContinuation`](Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<`T` \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<`T` \| `undefined`\> + +#### Inherited from + +[`Feed`](Feed.md).[`getContinuationData`](Feed.md#getcontinuationdata) + +*** + +### getFilteredFeed() + +> **getFilteredFeed**(`filter`): `Promise`\<[`Feed`](Feed.md)\<`T`\>\> + +Defined in: [src/core/mixins/FilterableFeed.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L45) + +Applies given filter and returns a new [Feed](Feed.md) object. + +#### Parameters + +##### filter + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<[`Feed`](Feed.md)\<`T`\>\> + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](Feed.md).[`getShelf`](Feed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`getPlaylistsFromMemo`](Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`getVideosFromMemo`](Feed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/Mixins/classes/MediaInfo.md b/docs/api/youtubei.js/namespaces/Mixins/classes/MediaInfo.md new file mode 100644 index 00000000..304a3fed --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Mixins/classes/MediaInfo.md @@ -0,0 +1,458 @@ +[youtubei.js](../../../../README.md) / [Mixins](../README.md) / MediaInfo + +# Class: MediaInfo + +Defined in: [src/core/mixins/MediaInfo.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L33) + +## Extended by + +- [`VideoInfo`](../../YT/classes/VideoInfo.md) +- [`TrackInfo`](../../YTMusic/classes/TrackInfo.md) +- [`VideoInfo`](../../YTKids/classes/VideoInfo.md) +- [`ShortFormVideoInfo`](../../YTShorts/classes/ShortFormVideoInfo.md) + +## Constructors + +### Constructor + +> **new MediaInfo**(`data`, `actions`, `cpn`): `MediaInfo` + +Defined in: [src/core/mixins/MediaInfo.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L49) + +#### Parameters + +##### data + +\[[`ApiResponse`](../../../../interfaces/ApiResponse.md), [`ApiResponse`](../../../../interfaces/ApiResponse.md)?\] + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### cpn + +`string` + +#### Returns + +`MediaInfo` + +## Properties + +### annotations? + +> `optional` **annotations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlayerAnnotationsExpanded`](../../YTNodes/classes/PlayerAnnotationsExpanded.md)\> + +Defined in: [src/core/mixins/MediaInfo.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L40) + +*** + +### basic\_info + +> **basic\_info**: `object` + +Defined in: [src/core/mixins/MediaInfo.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L39) + +#### allow\_ratings? + +> `optional` **allow\_ratings**: `boolean` + +#### author? + +> `optional` **author**: `string` + +#### category + +> **category**: `string` \| `null` + +#### channel + +> **channel**: \{ `id`: `string`; `name`: `string`; `url`: `string`; \} \| `null` + +#### channel\_id? + +> `optional` **channel\_id**: `string` + +#### duration? + +> `optional` **duration**: `number` + +#### embed + +> **embed**: \{ `flash_secure_url`: `string`; `flash_url`: `string`; `height`: `any`; `iframe_url`: `string`; `width`: `any`; \} \| `null` \| `undefined` + +#### end\_timestamp + +> **end\_timestamp**: `Date` \| `null` + +#### has\_ypc\_metadata + +> **has\_ypc\_metadata**: `boolean` \| `null` + +#### id? + +> `optional` **id**: `string` + +#### is\_crawlable? + +> `optional` **is\_crawlable**: `boolean` + +#### is\_disliked + +> **is\_disliked**: `boolean` \| `undefined` + +#### is\_family\_safe + +> **is\_family\_safe**: `boolean` \| `undefined` = `info.microformat.is_family_safe` + +#### is\_liked + +> **is\_liked**: `boolean` \| `undefined` + +#### is\_live? + +> `optional` **is\_live**: `boolean` + +#### is\_live\_content? + +> `optional` **is\_live\_content**: `boolean` + +#### is\_live\_dvr\_enabled? + +> `optional` **is\_live\_dvr\_enabled**: `boolean` + +#### is\_low\_latency\_live\_stream? + +> `optional` **is\_low\_latency\_live\_stream**: `boolean` + +#### is\_owner\_viewing? + +> `optional` **is\_owner\_viewing**: `boolean` + +#### is\_post\_live\_dvr? + +> `optional` **is\_post\_live\_dvr**: `boolean` + +#### is\_private? + +> `optional` **is\_private**: `boolean` + +#### is\_unlisted + +> **is\_unlisted**: `boolean` \| `undefined` = `info.microformat.is_unlisted` + +#### is\_upcoming? + +> `optional` **is\_upcoming**: `boolean` + +#### keywords? + +> `optional` **keywords**: `string`[] + +#### like\_count + +> **like\_count**: `number` \| `undefined` + +#### live\_chunk\_readahead? + +> `optional` **live\_chunk\_readahead**: `number` + +#### short\_description? + +> `optional` **short\_description**: `string` + +#### start\_timestamp + +> **start\_timestamp**: `Date` \| `null` + +#### tags + +> **tags**: `string`[] \| `null` + +#### thumbnail? + +> `optional` **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +#### title? + +> `optional` **title**: `string` + +#### url\_canonical + +> **url\_canonical**: `string` \| `null` + +#### view\_count + +> **view\_count**: `number` \| `undefined` + +*** + +### captions? + +> `optional` **captions**: [`PlayerCaptionsTracklist`](../../YTNodes/classes/PlayerCaptionsTracklist.md) + +Defined in: [src/core/mixins/MediaInfo.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L43) + +*** + +### cards? + +> `optional` **cards**: [`CardCollection`](../../YTNodes/classes/CardCollection.md) + +Defined in: [src/core/mixins/MediaInfo.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L44) + +*** + +### endscreen? + +> `optional` **endscreen**: [`Endscreen`](../../YTNodes/classes/Endscreen.md) + +Defined in: [src/core/mixins/MediaInfo.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L42) + +*** + +### playability\_status? + +> `optional` **playability\_status**: [`IPlayabilityStatus`](../../../../interfaces/IPlayabilityStatus.md) + +Defined in: [src/core/mixins/MediaInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L46) + +*** + +### player\_config? + +> `optional` **player\_config**: [`IPlayerConfig`](../../../../interfaces/IPlayerConfig.md) + +Defined in: [src/core/mixins/MediaInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L47) + +*** + +### storyboards? + +> `optional` **storyboards**: [`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md) \| [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md) + +Defined in: [src/core/mixins/MediaInfo.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L41) + +*** + +### streaming\_data? + +> `optional` **streaming\_data**: [`IStreamingData`](../../../../interfaces/IStreamingData.md) + +Defined in: [src/core/mixins/MediaInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L45) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/MediaInfo.ts:247](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L247) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +*** + +### cpn + +#### Get Signature + +> **get** **cpn**(): `string` + +Defined in: [src/core/mixins/MediaInfo.ts:254](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L254) + +Content Playback Nonce. + +##### Returns + +`string` + +*** + +### page + +#### Get Signature + +> **get** **page**(): \[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] + +Defined in: [src/core/mixins/MediaInfo.ts:261](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L261) + +Parsed InnerTube response. + +##### Returns + +\[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] + +## Methods + +### addToWatchHistory() + +> **addToWatchHistory**(`client_name?`, `client_version?`, `replacement?`): `Promise`\<`Response`\> + +Defined in: [src/core/mixins/MediaInfo.ts:208](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L208) + +#### Parameters + +##### client\_name? + +`string` + +##### client\_version? + +`string` + +##### replacement? + +`string` = `'https://www.'` + +#### Returns + +`Promise`\<`Response`\> + +*** + +### chooseFormat() + +> **chooseFormat**(`options`): [`Format`](../../Misc/classes/Format.md) + +Defined in: [src/core/mixins/MediaInfo.ts:161](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L161) + +Selects the format that best matches the given options. + +#### Parameters + +##### options + +[`FormatOptions`](../../Types/interfaces/FormatOptions.md) + +Options + +#### Returns + +[`Format`](../../Misc/classes/Format.md) + +*** + +### download() + +> **download**(`options`): `Promise`\<`ReadableStream`\<`Uint8Array`\>\> + +Defined in: [src/core/mixins/MediaInfo.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L169) + +Downloads the video. + +#### Parameters + +##### options + +[`DownloadOptions`](../../Types/interfaces/DownloadOptions.md) = `{}` + +Download options. + +#### Returns + +`Promise`\<`ReadableStream`\<`Uint8Array`\>\> + +*** + +### getStreamingInfo() + +> **getStreamingInfo**(`url_transformer?`, `format_filter?`): `Promise`\<`StreamingInfo`\> + +Defined in: [src/core/mixins/MediaInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L144) + +Get a cleaned up representation of the adaptive_formats + +#### Parameters + +##### url\_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) + +##### format\_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) + +#### Returns + +`Promise`\<`StreamingInfo`\> + +*** + +### getTranscript() + +> **getTranscript**(): `Promise`\<[`TranscriptInfo`](../../YT/classes/TranscriptInfo.md)\> + +Defined in: [src/core/mixins/MediaInfo.ts:182](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L182) + +Retrieves the video's transcript. + +#### Returns + +`Promise`\<[`TranscriptInfo`](../../YT/classes/TranscriptInfo.md)\> + +*** + +### toDash() + +> **toDash**(`options`): `Promise`\<`string`\> + +Defined in: [src/core/mixins/MediaInfo.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L104) + +Generates a DASH manifest from the streaming data. + +#### Parameters + +##### options + +###### format_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) + +###### manifest_options? + +`DashOptions` + +###### url_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) + +#### Returns + +`Promise`\<`string`\> + +DASH manifest + +*** + +### updateWatchTime() + +> **updateWatchTime**(`startTime`, `client_name`, `client_version`, `replacement`): `Promise`\<`Response`\> + +Defined in: [src/core/mixins/MediaInfo.ts:227](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L227) + +#### Parameters + +##### startTime + +`number` + +##### client\_name + +`string` = `Constants.CLIENTS.WEB.NAME` + +##### client\_version + +`string` = `Constants.CLIENTS.WEB.VERSION` + +##### replacement + +`string` = `'https://www.'` + +#### Returns + +`Promise`\<`Response`\> diff --git a/docs/api/youtubei.js/namespaces/Mixins/classes/TabbedFeed.md b/docs/api/youtubei.js/namespaces/Mixins/classes/TabbedFeed.md new file mode 100644 index 00000000..8731d00a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Mixins/classes/TabbedFeed.md @@ -0,0 +1,455 @@ +[youtubei.js](../../../../README.md) / [Mixins](../README.md) / TabbedFeed + +# Class: TabbedFeed\ + +Defined in: [src/core/mixins/TabbedFeed.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L9) + +## Extends + +- [`Feed`](Feed.md)\<`T`\> + +## Extended by + +- [`Channel`](../../YT/classes/Channel.md) + +## Type Parameters + +### T + +`T` *extends* [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +## Constructors + +### Constructor + +> **new TabbedFeed**\<`T`\>(`actions`, `data`, `already_parsed`): `TabbedFeed`\<`T`\> + +Defined in: [src/core/mixins/TabbedFeed.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L13) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`IParsedResponse`](../../../../interfaces/IParsedResponse.md) | [`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`TabbedFeed`\<`T`\> + +#### Overrides + +[`Feed`](Feed.md).[`constructor`](Feed.md#constructor) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](Feed.md).[`actions`](Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`channels`](Feed.md#channels) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`Feed`](Feed.md).[`has_continuation`](Feed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](Feed.md).[`memo`](Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](Feed.md).[`page`](Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](Feed.md).[`page_contents`](Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`playlists`](Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`posts`](Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](Feed.md).[`secondary_contents`](Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`shelves`](Feed.md#shelves) + +*** + +### tabs + +#### Get Signature + +> **get** **tabs**(): `string`[] + +Defined in: [src/core/mixins/TabbedFeed.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L19) + +##### Returns + +`string`[] + +*** + +### title + +#### Get Signature + +> **get** **title**(): `string` \| `undefined` + +Defined in: [src/core/mixins/TabbedFeed.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L55) + +##### Returns + +`string` \| `undefined` + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`videos`](Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<[`Feed`](Feed.md)\<`T`\>\> + +Defined in: [src/core/mixins/Feed.ts:219](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L219) + +Retrieves next batch of contents and returns a new [Feed](Feed.md) object. + +#### Returns + +`Promise`\<[`Feed`](Feed.md)\<`T`\>\> + +#### Inherited from + +[`Feed`](Feed.md).[`getContinuation`](Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<`T` \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<`T` \| `undefined`\> + +#### Inherited from + +[`Feed`](Feed.md).[`getContinuationData`](Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](Feed.md).[`getShelf`](Feed.md#getshelf) + +*** + +### getTabByName() + +> **getTabByName**(`title`): `Promise`\<`TabbedFeed`\<`T`\>\> + +Defined in: [src/core/mixins/TabbedFeed.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L23) + +#### Parameters + +##### title + +`string` + +#### Returns + +`Promise`\<`TabbedFeed`\<`T`\>\> + +*** + +### getTabByURL() + +> **getTabByURL**(`url`): `Promise`\<`TabbedFeed`\<`T`\>\> + +Defined in: [src/core/mixins/TabbedFeed.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L37) + +#### Parameters + +##### url + +`string` + +#### Returns + +`Promise`\<`TabbedFeed`\<`T`\>\> + +*** + +### hasTabWithURL() + +> **hasTabWithURL**(`url`): `boolean` + +Defined in: [src/core/mixins/TabbedFeed.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L51) + +#### Parameters + +##### url + +`string` + +#### Returns + +`boolean` + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`getPlaylistsFromMemo`](Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](Feed.md).[`getVideosFromMemo`](Feed.md#getvideosfrommemo) diff --git a/docs/api/namespaces/Parser/README.md b/docs/api/youtubei.js/namespaces/Parser/README.md similarity index 92% rename from docs/api/namespaces/Parser/README.md rename to docs/api/youtubei.js/namespaces/Parser/README.md index 41dcda2b..27042af9 100644 --- a/docs/api/namespaces/Parser/README.md +++ b/docs/api/youtubei.js/namespaces/Parser/README.md @@ -1,15 +1,13 @@ -[youtubei.js](../../README.md) / Parser +[youtubei.js](../../../README.md) / Parser # Parser -## Index - -### Type Aliases +## Type Aliases - [ParserError](type-aliases/ParserError.md) - [ParserErrorHandler](type-aliases/ParserErrorHandler.md) -### Functions +## Functions - [addRuntimeParser](functions/addRuntimeParser.md) - [applyCommentsMutations](functions/applyCommentsMutations.md) diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/addRuntimeParser.md b/docs/api/youtubei.js/namespaces/Parser/functions/addRuntimeParser.md new file mode 100644 index 00000000..905abe84 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/addRuntimeParser.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / addRuntimeParser + +# Function: addRuntimeParser() + +> **addRuntimeParser**(`classname`, `ParserConstructor`): `void` + +Defined in: [src/parser/parser.ts:218](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L218) + +## Parameters + +### classname + +`string` + +### ParserConstructor + +[`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md) + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/applyCommentsMutations.md b/docs/api/youtubei.js/namespaces/Parser/functions/applyCommentsMutations.md new file mode 100644 index 00000000..1051f3b3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/applyCommentsMutations.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / applyCommentsMutations + +# Function: applyCommentsMutations() + +> **applyCommentsMutations**(`memo`, `mutations`): `void` + +Defined in: [src/parser/parser.ts:825](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L825) + +## Parameters + +### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +### mutations + +[`RawNode`](../../../../type-aliases/RawNode.md)[] + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/applyMutations.md b/docs/api/youtubei.js/namespaces/Parser/functions/applyMutations.md new file mode 100644 index 00000000..ab3dba58 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/applyMutations.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / applyMutations + +# Function: applyMutations() + +> **applyMutations**(`memo`, `mutations`): `void` + +Defined in: [src/parser/parser.ts:771](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L771) + +## Parameters + +### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +### mutations + +[`RawNode`](../../../../type-aliases/RawNode.md)[] + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/getDynamicParsers.md b/docs/api/youtubei.js/namespaces/Parser/functions/getDynamicParsers.md new file mode 100644 index 00000000..6d255f1f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/getDynamicParsers.md @@ -0,0 +1,11 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / getDynamicParsers + +# Function: getDynamicParsers() + +> **getDynamicParsers**(): `object` + +Defined in: [src/parser/parser.ts:223](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L223) + +## Returns + +`object` diff --git a/docs/api/namespaces/Parser/functions/getParserByName.md b/docs/api/youtubei.js/namespaces/Parser/functions/getParserByName.md similarity index 56% rename from docs/api/namespaces/Parser/functions/getParserByName.md rename to docs/api/youtubei.js/namespaces/Parser/functions/getParserByName.md index f30b5ea8..e5728a13 100644 --- a/docs/api/namespaces/Parser/functions/getParserByName.md +++ b/docs/api/youtubei.js/namespaces/Parser/functions/getParserByName.md @@ -1,17 +1,17 @@ -[youtubei.js](../../../README.md) / [Parser](../README.md) / getParserByName +[youtubei.js](../../../../README.md) / [Parser](../README.md) / getParserByName # Function: getParserByName() > **getParserByName**(`classname`): [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/parser.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L202) + ## Parameters -• **classname**: `string` +### classname + +`string` ## Returns [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> - -## Defined in - -[src/parser/parser.ts:202](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/parser.ts#L202) diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/hasParser.md b/docs/api/youtubei.js/namespaces/Parser/functions/hasParser.md new file mode 100644 index 00000000..d177920c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/hasParser.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / hasParser + +# Function: hasParser() + +> **hasParser**(`classname`): `boolean` + +Defined in: [src/parser/parser.ts:214](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L214) + +## Parameters + +### classname + +`string` + +## Returns + +`boolean` diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parse.md b/docs/api/youtubei.js/namespaces/Parser/functions/parse.md new file mode 100644 index 00000000..ce9fece7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parse.md @@ -0,0 +1,125 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parse + +# Function: parse() + +## Call Signature + +> **parse**\<`T`, `K`\>(`data`, `requireArray`, `validTypes?`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> \| `null` + +Defined in: [src/parser/parser.ts:628](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L628) + +Parses an item or an array of items. + +### Type Parameters + +#### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +#### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +### Parameters + +#### data + +[`RawData`](../../../../type-aliases/RawData.md) + +The data to parse. + +#### requireArray + +`true` + +Whether the data should be parsed as an array. + +#### validTypes? + +`K` + +YTNode types that are allowed to be parsed. + +### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> \| `null` + +## Call Signature + +> **parse**\<`T`, `K`\>(`data`, `requireArray`, `validTypes?`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\>\> \| `null` + +Defined in: [src/parser/parser.ts:629](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L629) + +Parses an item or an array of items. + +### Type Parameters + +#### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +#### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\> + +### Parameters + +#### data + +[`RawData`](../../../../type-aliases/RawData.md) + +The data to parse. + +#### requireArray + +`true` + +Whether the data should be parsed as an array. + +#### validTypes? + +`K` + +YTNode types that are allowed to be parsed. + +### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\>\> \| `null` + +## Call Signature + +> **parse**\<`T`\>(`data?`, `requireArray?`, `validTypes?`): [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<`T`\> + +Defined in: [src/parser/parser.ts:630](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L630) + +Parses an item or an array of items. + +### Type Parameters + +#### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) = [`YTNode`](../../Helpers/classes/YTNode.md) + +### Parameters + +#### data? + +[`RawData`](../../../../type-aliases/RawData.md) + +The data to parse. + +#### requireArray? + +`false` + +Whether the data should be parsed as an array. + +#### validTypes? + +YTNode types that are allowed to be parsed. + +[`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\> | [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +### Returns + +[`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<`T`\> diff --git a/docs/api/namespaces/Parser/functions/parseActions.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseActions.md similarity index 51% rename from docs/api/namespaces/Parser/functions/parseActions.md rename to docs/api/youtubei.js/namespaces/Parser/functions/parseActions.md index b2032f71..6805d41b 100644 --- a/docs/api/namespaces/Parser/functions/parseActions.md +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseActions.md @@ -1,17 +1,17 @@ -[youtubei.js](../../../README.md) / [Parser](../README.md) / parseActions +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseActions # Function: parseActions() > **parseActions**(`data`): [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/parser.ts:757](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L757) + ## Parameters -• **data**: [`RawData`](../../APIResponseTypes/type-aliases/RawData.md) +### data + +[`RawData`](../../../../type-aliases/RawData.md) ## Returns [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> - -## Defined in - -[src/parser/parser.ts:757](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/parser.ts#L757) diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parseArray.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseArray.md new file mode 100644 index 00000000..ce140bfc --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseArray.md @@ -0,0 +1,89 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseArray + +# Function: parseArray() + +## Call Signature + +> **parseArray**\<`T`, `K`\>(`data`, `validTypes`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> + +Defined in: [src/parser/parser.ts:601](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L601) + +Parses an array of items. + +### Type Parameters + +#### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +#### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +### Parameters + +#### data + +The data to parse. + +[`RawNode`](../../../../type-aliases/RawNode.md)[] | `undefined` + +#### validTypes + +`K` + +YTNode types that are allowed to be parsed. + +### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`InstanceType`\<`K`\[`number`\]\>\> + +## Call Signature + +> **parseArray**\<`T`\>(`data`, `validType`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`T`\> + +Defined in: [src/parser/parser.ts:602](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L602) + +Parses an array of items. + +### Type Parameters + +#### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) = [`YTNode`](../../Helpers/classes/YTNode.md) + +### Parameters + +#### data + +The data to parse. + +[`RawNode`](../../../../type-aliases/RawNode.md)[] | `undefined` + +#### validType + +[`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\> + +### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`T`\> + +## Call Signature + +> **parseArray**(`data`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/parser.ts:603](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L603) + +Parses an array of items. + +### Parameters + +#### data + +The data to parse. + +[`RawNode`](../../../../type-aliases/RawNode.md)[] | `undefined` + +### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parseC.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseC.md new file mode 100644 index 00000000..9f0bf53d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseC.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseC + +# Function: parseC() + +> **parseC**(`data`): [`Continuation`](../../../../classes/Continuation.md) \| `null` + +Defined in: [src/parser/parser.ts:715](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L715) + +## Parameters + +### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +## Returns + +[`Continuation`](../../../../classes/Continuation.md) \| `null` diff --git a/docs/api/namespaces/Parser/functions/parseCommand.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseCommand.md similarity index 55% rename from docs/api/namespaces/Parser/functions/parseCommand.md rename to docs/api/youtubei.js/namespaces/Parser/functions/parseCommand.md index f8c7ef60..8fc2e382 100644 --- a/docs/api/namespaces/Parser/functions/parseCommand.md +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseCommand.md @@ -1,14 +1,18 @@ -[youtubei.js](../../../README.md) / [Parser](../README.md) / parseCommand +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseCommand # Function: parseCommand() > **parseCommand**(`data`): [`YTNode`](../../Helpers/classes/YTNode.md) \| `undefined` +Defined in: [src/parser/parser.ts:663](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L663) + Parses an InnerTube command and returns a YTNode instance if applicable. ## Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +### data + +[`RawNode`](../../../../type-aliases/RawNode.md) The raw node data to parse @@ -17,7 +21,3 @@ The raw node data to parse [`YTNode`](../../Helpers/classes/YTNode.md) \| `undefined` A YTNode instance if parsing is successful, undefined otherwise - -## Defined in - -[src/parser/parser.ts:663](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/parser.ts#L663) diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parseCommands.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseCommands.md new file mode 100644 index 00000000..5c2f2c98 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseCommands.md @@ -0,0 +1,23 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseCommands + +# Function: parseCommands() + +> **parseCommands**(`commands?`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/parser.ts:699](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L699) + +Parses an array of InnerTube command nodes. + +## Parameters + +### commands? + +[`RawNode`](../../../../type-aliases/RawNode.md)[] + +Array of raw command nodes to parse + +## Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +An observed array of parsed YTNodes diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parseFormats.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseFormats.md new file mode 100644 index 00000000..37dc9029 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseFormats.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseFormats + +# Function: parseFormats() + +> **parseFormats**(`formats`, `this_response_nsig_cache`): [`Format`](../../Misc/classes/Format.md)[] + +Defined in: [src/parser/parser.ts:767](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L767) + +## Parameters + +### formats + +[`RawNode`](../../../../type-aliases/RawNode.md)[] + +### this\_response\_nsig\_cache + +`Map`\<`string`, `string`\> + +## Returns + +[`Format`](../../Misc/classes/Format.md)[] diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parseItem.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseItem.md new file mode 100644 index 00000000..02b4f04b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseItem.md @@ -0,0 +1,91 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseItem + +# Function: parseItem() + +## Call Signature + +> **parseItem**\<`T`, `K`\>(`data`, `validTypes`): `InstanceType`\<`K`\[`number`\]\> \| `null` + +Defined in: [src/parser/parser.ts:535](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L535) + +Parses an item. + +### Type Parameters + +#### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +#### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +### Parameters + +#### data + +The data to parse. + +[`RawNode`](../../../../type-aliases/RawNode.md) | `undefined` + +#### validTypes + +`K` + +YTNode types that are allowed to be parsed. + +### Returns + +`InstanceType`\<`K`\[`number`\]\> \| `null` + +## Call Signature + +> **parseItem**\<`T`\>(`data`, `validTypes`): `T` \| `null` + +Defined in: [src/parser/parser.ts:536](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L536) + +Parses an item. + +### Type Parameters + +#### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +### Parameters + +#### data + +The data to parse. + +[`RawNode`](../../../../type-aliases/RawNode.md) | `undefined` + +#### validTypes + +[`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\> + +YTNode types that are allowed to be parsed. + +### Returns + +`T` \| `null` + +## Call Signature + +> **parseItem**(`data?`): [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/parser.ts:537](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L537) + +Parses an item. + +### Parameters + +#### data? + +[`RawNode`](../../../../type-aliases/RawNode.md) + +The data to parse. + +### Returns + +[`YTNode`](../../Helpers/classes/YTNode.md) diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parseLC.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseLC.md new file mode 100644 index 00000000..bf7730ca --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseLC.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseLC + +# Function: parseLC() + +> **parseLC**(`data`): [`ItemSectionContinuation`](../../../../classes/ItemSectionContinuation.md) \| [`SectionListContinuation`](../../../../classes/SectionListContinuation.md) \| [`LiveChatContinuation`](../../../../classes/LiveChatContinuation.md) \| [`MusicPlaylistShelfContinuation`](../../../../classes/MusicPlaylistShelfContinuation.md) \| [`MusicShelfContinuation`](../../../../classes/MusicShelfContinuation.md) \| [`GridContinuation`](../../../../classes/GridContinuation.md) \| [`PlaylistPanelContinuation`](../../../../classes/PlaylistPanelContinuation.md) \| [`ContinuationCommand`](../../../../classes/ContinuationCommand.md) \| `null` + +Defined in: [src/parser/parser.ts:721](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L721) + +## Parameters + +### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +## Returns + +[`ItemSectionContinuation`](../../../../classes/ItemSectionContinuation.md) \| [`SectionListContinuation`](../../../../classes/SectionListContinuation.md) \| [`LiveChatContinuation`](../../../../classes/LiveChatContinuation.md) \| [`MusicPlaylistShelfContinuation`](../../../../classes/MusicPlaylistShelfContinuation.md) \| [`MusicShelfContinuation`](../../../../classes/MusicShelfContinuation.md) \| [`GridContinuation`](../../../../classes/GridContinuation.md) \| [`PlaylistPanelContinuation`](../../../../classes/PlaylistPanelContinuation.md) \| [`ContinuationCommand`](../../../../classes/ContinuationCommand.md) \| `null` diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parseRR.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseRR.md new file mode 100644 index 00000000..03aca34a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseRR.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseRR + +# Function: parseRR() + +> **parseRR**(`actions`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`OpenPopupAction`](../../YTNodes/classes/OpenPopupAction.md) \| [`AppendContinuationItemsAction`](../../../../classes/AppendContinuationItemsAction.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) \| [`NavigateAction`](../../../../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../../../../classes/ShowMiniplayerCommand.md)\> + +Defined in: [src/parser/parser.ts:742](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L742) + +## Parameters + +### actions + +[`RawNode`](../../../../type-aliases/RawNode.md)[] + +## Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`OpenPopupAction`](../../YTNodes/classes/OpenPopupAction.md) \| [`AppendContinuationItemsAction`](../../../../classes/AppendContinuationItemsAction.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) \| [`NavigateAction`](../../../../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../../../../classes/ShowMiniplayerCommand.md)\> diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/parseResponse.md b/docs/api/youtubei.js/namespaces/Parser/functions/parseResponse.md new file mode 100644 index 00000000..6a389d27 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/parseResponse.md @@ -0,0 +1,27 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / parseResponse + +# Function: parseResponse() + +> **parseResponse**\<`T`\>(`data`): `T` + +Defined in: [src/parser/parser.ts:231](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L231) + +Parses a given InnerTube response. + +## Type Parameters + +### T + +`T` *extends* [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) = [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +## Parameters + +### data + +[`IRawResponse`](../../../../interfaces/IRawResponse.md) + +Raw data. + +## Returns + +`T` diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/sanitizeClassName.md b/docs/api/youtubei.js/namespaces/Parser/functions/sanitizeClassName.md new file mode 100644 index 00000000..4ebf1a52 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/sanitizeClassName.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / sanitizeClassName + +# Function: sanitizeClassName() + +> **sanitizeClassName**(`input`): `string` + +Defined in: [src/parser/parser.ts:196](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L196) + +## Parameters + +### input + +`string` + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/setParserErrorHandler.md b/docs/api/youtubei.js/namespaces/Parser/functions/setParserErrorHandler.md new file mode 100644 index 00000000..be2e3b87 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/setParserErrorHandler.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / setParserErrorHandler + +# Function: setParserErrorHandler() + +> **setParserErrorHandler**(`handler`): `void` + +Defined in: [src/parser/parser.ts:163](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L163) + +## Parameters + +### handler + +[`ParserErrorHandler`](../type-aliases/ParserErrorHandler.md) + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Parser/functions/shouldIgnore.md b/docs/api/youtubei.js/namespaces/Parser/functions/shouldIgnore.md new file mode 100644 index 00000000..a93312a8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/functions/shouldIgnore.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / shouldIgnore + +# Function: shouldIgnore() + +> **shouldIgnore**(`classname`): `boolean` + +Defined in: [src/parser/parser.ts:192](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L192) + +## Parameters + +### classname + +`string` + +## Returns + +`boolean` diff --git a/docs/api/youtubei.js/namespaces/Parser/type-aliases/ParserError.md b/docs/api/youtubei.js/namespaces/Parser/type-aliases/ParserError.md new file mode 100644 index 00000000..5c5933de --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/type-aliases/ParserError.md @@ -0,0 +1,13 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / ParserError + +# Type Alias: ParserError + +> **ParserError** = `object` & \{ `classdata`: [`RawNode`](../../../../type-aliases/RawNode.md); `error_type`: `"typecheck"`; `expected`: `string` \| `string`[]; \} \| \{ `classdata`: [`RawNode`](../../../../type-aliases/RawNode.md); `error`: `unknown`; `error_type`: `"parse"`; \} \| \{ `classname`: `string`; `error_type`: `"mutation_data_missing"`; \} \| \{ `error_type`: `"mutation_data_invalid"`; `failed`: `number`; `titles`: `string`[]; `total`: `number`; \} \| \{ `error_type`: `"class_not_found"`; `key_info`: [`KeyInfo`](../../Generator/type-aliases/KeyInfo.md); \} \| \{ `changed_keys`: [`KeyInfo`](../../Generator/type-aliases/KeyInfo.md); `error_type`: `"class_changed"`; `key_info`: [`KeyInfo`](../../Generator/type-aliases/KeyInfo.md); \} + +Defined in: [src/parser/parser.ts:48](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L48) + +## Type Declaration + +### classname + +> **classname**: `string` diff --git a/docs/api/youtubei.js/namespaces/Parser/type-aliases/ParserErrorHandler.md b/docs/api/youtubei.js/namespaces/Parser/type-aliases/ParserErrorHandler.md new file mode 100644 index 00000000..de33ffd3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Parser/type-aliases/ParserErrorHandler.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Parser](../README.md) / ParserErrorHandler + +# Type Alias: ParserErrorHandler() + +> **ParserErrorHandler** = (`error`) => `void` + +Defined in: [src/parser/parser.ts:75](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/parser.ts#L75) + +## Parameters + +### error + +[`ParserError`](ParserError.md) + +## Returns + +`void` diff --git a/docs/api/namespaces/ProtoUtils/README.md b/docs/api/youtubei.js/namespaces/ProtoUtils/README.md similarity index 78% rename from docs/api/namespaces/ProtoUtils/README.md rename to docs/api/youtubei.js/namespaces/ProtoUtils/README.md index 491cae4d..b2553eb5 100644 --- a/docs/api/namespaces/ProtoUtils/README.md +++ b/docs/api/youtubei.js/namespaces/ProtoUtils/README.md @@ -1,14 +1,12 @@ -[youtubei.js](../../README.md) / ProtoUtils +[youtubei.js](../../../README.md) / ProtoUtils # ProtoUtils -## Index - -### Type Aliases +## Type Aliases - [CommentActionParamsArgs](type-aliases/CommentActionParamsArgs.md) -### Functions +## Functions - [decodeVisitorData](functions/decodeVisitorData.md) - [encodeCommentActionParams](functions/encodeCommentActionParams.md) diff --git a/docs/api/youtubei.js/namespaces/ProtoUtils/functions/decodeVisitorData.md b/docs/api/youtubei.js/namespaces/ProtoUtils/functions/decodeVisitorData.md new file mode 100644 index 00000000..70190273 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/ProtoUtils/functions/decodeVisitorData.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [ProtoUtils](../README.md) / decodeVisitorData + +# Function: decodeVisitorData() + +> **decodeVisitorData**(`visitor_data`): `VisitorData` + +Defined in: [src/utils/ProtoUtils.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L16) + +## Parameters + +### visitor\_data + +`string` + +## Returns + +`VisitorData` diff --git a/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeCommentActionParams.md b/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeCommentActionParams.md new file mode 100644 index 00000000..74f973cf --- /dev/null +++ b/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeCommentActionParams.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [ProtoUtils](../README.md) / encodeCommentActionParams + +# Function: encodeCommentActionParams() + +> **encodeCommentActionParams**(`type`, `args`): `string` + +Defined in: [src/utils/ProtoUtils.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L20) + +## Parameters + +### type + +`number` + +### args + +[`CommentActionParamsArgs`](../type-aliases/CommentActionParamsArgs.md) = `{}` + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeNextParams.md b/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeNextParams.md new file mode 100644 index 00000000..8dc95969 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeNextParams.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [ProtoUtils](../README.md) / encodeNextParams + +# Function: encodeNextParams() + +> **encodeNextParams**(`video_ids`, `playlist_title?`): `string` + +Defined in: [src/utils/ProtoUtils.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L51) + +## Parameters + +### video\_ids + +`string`[] + +### playlist\_title? + +`string` + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeVisitorData.md b/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeVisitorData.md new file mode 100644 index 00000000..a25b0054 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/ProtoUtils/functions/encodeVisitorData.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [ProtoUtils](../README.md) / encodeVisitorData + +# Function: encodeVisitorData() + +> **encodeVisitorData**(`id`, `timestamp`): `string` + +Defined in: [src/utils/ProtoUtils.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L11) + +## Parameters + +### id + +`string` + +### timestamp + +`number` + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/ProtoUtils/type-aliases/CommentActionParamsArgs.md b/docs/api/youtubei.js/namespaces/ProtoUtils/type-aliases/CommentActionParamsArgs.md new file mode 100644 index 00000000..4c6c4bdd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/ProtoUtils/type-aliases/CommentActionParamsArgs.md @@ -0,0 +1,39 @@ +[youtubei.js](../../../../README.md) / [ProtoUtils](../README.md) / CommentActionParamsArgs + +# Type Alias: CommentActionParamsArgs + +> **CommentActionParamsArgs** = `object` + +Defined in: [src/utils/ProtoUtils.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L4) + +## Properties + +### comment\_id? + +> `optional` **comment\_id**: `string` + +Defined in: [src/utils/ProtoUtils.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L5) + +*** + +### target\_language? + +> `optional` **target\_language**: `string` + +Defined in: [src/utils/ProtoUtils.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L8) + +*** + +### text? + +> `optional` **text**: `string` + +Defined in: [src/utils/ProtoUtils.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L7) + +*** + +### video\_id? + +> `optional` **video\_id**: `string` + +Defined in: [src/utils/ProtoUtils.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/ProtoUtils.ts#L6) diff --git a/docs/api/namespaces/Types/README.md b/docs/api/youtubei.js/namespaces/Types/README.md similarity index 95% rename from docs/api/namespaces/Types/README.md rename to docs/api/youtubei.js/namespaces/Types/README.md index cf921fe9..f157b371 100644 --- a/docs/api/namespaces/Types/README.md +++ b/docs/api/youtubei.js/namespaces/Types/README.md @@ -1,15 +1,13 @@ -[youtubei.js](../../README.md) / Types +[youtubei.js](../../../README.md) / Types # Types -## Index - -### Classes +## Classes - [JsAnalyzer](classes/JsAnalyzer.md) - [JsExtractor](classes/JsExtractor.md) -### Interfaces +## Interfaces - [AnalyzerOptions](interfaces/AnalyzerOptions.md) - [BuildScriptResult](interfaces/BuildScriptResult.md) @@ -25,7 +23,7 @@ - [SideEffectPolicyOptions](interfaces/SideEffectPolicyOptions.md) - [VariableMetadata](interfaces/VariableMetadata.md) -### Type Aliases +## Type Aliases - [Duration](type-aliases/Duration.md) - [EngagementType](type-aliases/EngagementType.md) diff --git a/docs/api/youtubei.js/namespaces/Types/classes/JsAnalyzer.md b/docs/api/youtubei.js/namespaces/Types/classes/JsAnalyzer.md new file mode 100644 index 00000000..79d3c2a4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/classes/JsAnalyzer.md @@ -0,0 +1,79 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / JsAnalyzer + +# Class: JsAnalyzer + +Defined in: [src/utils/javascript/JsAnalyzer.ts:61](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L61) + +Performs dependency-aware extraction of variables inside an IIFE. + +## Constructors + +### Constructor + +> **new JsAnalyzer**(`code`, `options`): `JsAnalyzer` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:76](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L76) + +Creates a new instance over the provided source. + +#### Parameters + +##### code + +`string` + +JavaScript source to parse and inspect. + +##### options + +[`AnalyzerOptions`](../interfaces/AnalyzerOptions.md) = `{}` + +Optional traversal settings. + +#### Returns + +`JsAnalyzer` + +## Properties + +### declaredVariables + +> **declaredVariables**: `Map`\<`string`, [`VariableMetadata`](../interfaces/VariableMetadata.md)\> + +Defined in: [src/utils/javascript/JsAnalyzer.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L68) + +*** + +### iifeParamName + +> **iifeParamName**: `string` \| `null` = `null` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L69) + +## Methods + +### getExtractedMatches() + +> **getExtractedMatches**(): [`ExtractionState`](../interfaces/ExtractionState.md)[] + +Defined in: [src/utils/javascript/JsAnalyzer.ts:552](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L552) + +Returns the current set of matched extractions. + +#### Returns + +[`ExtractionState`](../interfaces/ExtractionState.md)[] + +*** + +### getSource() + +> **getSource**(): `string` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:560](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L560) + +Returns the raw, original source. + +#### Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/Types/classes/JsExtractor.md b/docs/api/youtubei.js/namespaces/Types/classes/JsExtractor.md new file mode 100644 index 00000000..0db04749 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/classes/JsExtractor.md @@ -0,0 +1,50 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / JsExtractor + +# Class: JsExtractor + +Defined in: [src/utils/javascript/JsExtractor.ts:61](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L61) + +Class responsible for extracting and emitting JavaScript code snippets +based on analysis results from a `JsAnalyzer` instance. + +## Constructors + +### Constructor + +> **new JsExtractor**(`analyzer`): `JsExtractor` + +Defined in: [src/utils/javascript/JsExtractor.ts:62](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L62) + +#### Parameters + +##### analyzer + +[`JsAnalyzer`](JsAnalyzer.md) + +#### Returns + +`JsExtractor` + +## Methods + +### buildScript() + +> **buildScript**(`config`): [`BuildScriptResult`](../interfaces/BuildScriptResult.md) + +Defined in: [src/utils/javascript/JsExtractor.ts:320](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L320) + +Processes extracted matches from the analyzer, handles dependencies, predeclares +variables as needed, and generates an IIFE-wrapped output string containing the +code snippets and exported variables. + +#### Parameters + +##### config + +[`EmitterOptions`](../interfaces/EmitterOptions.md) + +Configuration options for the emitter. + +#### Returns + +[`BuildScriptResult`](../interfaces/BuildScriptResult.md) diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/AnalyzerOptions.md b/docs/api/youtubei.js/namespaces/Types/interfaces/AnalyzerOptions.md new file mode 100644 index 00000000..11960a5e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/AnalyzerOptions.md @@ -0,0 +1,15 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / AnalyzerOptions + +# Interface: AnalyzerOptions + +Defined in: [src/utils/javascript/JsAnalyzer.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L26) + +## Properties + +### extractions? + +> `optional` **extractions**: [`ExtractionConfig`](ExtractionConfig.md) \| [`ExtractionConfig`](ExtractionConfig.md)[] + +Defined in: [src/utils/javascript/JsAnalyzer.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L30) + +One or more extraction configurations to look for while traversing. diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/BuildScriptResult.md b/docs/api/youtubei.js/namespaces/Types/interfaces/BuildScriptResult.md new file mode 100644 index 00000000..efc9fd4b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/BuildScriptResult.md @@ -0,0 +1,35 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / BuildScriptResult + +# Interface: BuildScriptResult + +Defined in: [src/utils/javascript/JsExtractor.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L42) + +## Properties + +### exported + +> **exported**: `string`[] + +Defined in: [src/utils/javascript/JsExtractor.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L50) + +An array of exported variable names. + +*** + +### exportedRawValues? + +> `optional` **exportedRawValues**: `Record`\<`string`, `any`\> + +Defined in: [src/utils/javascript/JsExtractor.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L54) + +An object mapping exported variable names to their raw values, if `exportRawValues` was enabled. + +*** + +### output + +> **output**: `string` + +Defined in: [src/utils/javascript/JsExtractor.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L46) + +The generated output script as a string. diff --git a/docs/api/namespaces/Types/interfaces/DownloadOptions.md b/docs/api/youtubei.js/namespaces/Types/interfaces/DownloadOptions.md similarity index 54% rename from docs/api/namespaces/Types/interfaces/DownloadOptions.md rename to docs/api/youtubei.js/namespaces/Types/interfaces/DownloadOptions.md index 82019739..9d19ec8c 100644 --- a/docs/api/namespaces/Types/interfaces/DownloadOptions.md +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/DownloadOptions.md @@ -1,7 +1,9 @@ -[youtubei.js](../../../README.md) / [Types](../README.md) / DownloadOptions +[youtubei.js](../../../../README.md) / [Types](../README.md) / DownloadOptions # Interface: DownloadOptions +Defined in: [src/types/FormatUtils.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L34) + ## Extends - [`FormatOptions`](FormatOptions.md) @@ -12,86 +14,78 @@ > `optional` **client**: [`InnerTubeClient`](../type-aliases/InnerTubeClient.md) +Defined in: [src/types/GetVideoInfoOptions.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/GetVideoInfoOptions.ts#L7) + InnerTube client. #### Inherited from [`FormatOptions`](FormatOptions.md).[`client`](FormatOptions.md#client) -#### Defined in - -[src/types/GetVideoInfoOptions.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/GetVideoInfoOptions.ts#L7) - *** ### codec? > `optional` **codec**: `string` +Defined in: [src/types/FormatUtils.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L31) + Video or audio codec, e.g. 'avc', 'vp9', 'av01' for video, 'opus', 'mp4a' for audio #### Inherited from [`FormatOptions`](FormatOptions.md).[`codec`](FormatOptions.md#codec) -#### Defined in - -[src/types/FormatUtils.ts:31](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/FormatUtils.ts#L31) - *** ### format? > `optional` **format**: `string` +Defined in: [src/types/FormatUtils.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L27) + File format, use 'any' to download any format #### Inherited from [`FormatOptions`](FormatOptions.md).[`format`](FormatOptions.md#format) -#### Defined in - -[src/types/FormatUtils.ts:27](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/FormatUtils.ts#L27) - *** ### itag? > `optional` **itag**: `number` +Defined in: [src/types/FormatUtils.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L11) + Video or audio itag #### Inherited from [`FormatOptions`](FormatOptions.md).[`itag`](FormatOptions.md#itag) -#### Defined in - -[src/types/FormatUtils.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/FormatUtils.ts#L11) - *** ### language? > `optional` **language**: `string` +Defined in: [src/types/FormatUtils.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L23) + Language code, defaults to 'original'. #### Inherited from [`FormatOptions`](FormatOptions.md).[`language`](FormatOptions.md#language) -#### Defined in - -[src/types/FormatUtils.ts:23](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/FormatUtils.ts#L23) - *** ### po\_token? > `optional` **po\_token**: `string` +Defined in: [src/types/GetVideoInfoOptions.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/GetVideoInfoOptions.ts#L12) + Proof of Origin token, bound to the video ID being requested. If not provided, session bound token will be used. @@ -99,32 +93,28 @@ If not provided, session bound token will be used. [`FormatOptions`](FormatOptions.md).[`po_token`](FormatOptions.md#po_token) -#### Defined in - -[src/types/GetVideoInfoOptions.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/GetVideoInfoOptions.ts#L12) - *** ### quality? > `optional` **quality**: `string` +Defined in: [src/types/FormatUtils.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L15) + Video quality; 360p, 720p, 1080p, etc... also accepts 'best' and 'bestefficiency'. #### Inherited from [`FormatOptions`](FormatOptions.md).[`quality`](FormatOptions.md#quality) -#### Defined in - -[src/types/FormatUtils.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/FormatUtils.ts#L15) - *** ### range? > `optional` **range**: `object` +Defined in: [src/types/FormatUtils.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L38) + Download range, indicates which bytes should be downloaded. #### end @@ -135,22 +125,16 @@ Download range, indicates which bytes should be downloaded. > **start**: `number` -#### Defined in - -[src/types/FormatUtils.ts:38](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/FormatUtils.ts#L38) - *** ### type? > `optional` **type**: `"video"` \| `"audio"` \| `"video+audio"` +Defined in: [src/types/FormatUtils.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L19) + Download type, can be: video, audio or video+audio #### Inherited from [`FormatOptions`](FormatOptions.md).[`type`](FormatOptions.md#type) - -#### Defined in - -[src/types/FormatUtils.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/types/FormatUtils.ts#L19) diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/EmitterOptions.md b/docs/api/youtubei.js/namespaces/Types/interfaces/EmitterOptions.md new file mode 100644 index 00000000..fd8227b7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/EmitterOptions.md @@ -0,0 +1,59 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / EmitterOptions + +# Interface: EmitterOptions + +Defined in: [src/utils/javascript/JsExtractor.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L15) + +## Properties + +### disallowSideEffectInitializers? + +> `optional` **disallowSideEffectInitializers**: `boolean` \| [`SideEffectPolicyOptions`](SideEffectPolicyOptions.md) + +Defined in: [src/utils/javascript/JsExtractor.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L26) + +When true or configured, replace unsafe initializers (calls, `new`, etc.) +with `undefined` to avoid executing side-effectful code. +Use `{ mode: 'loose' }` to allow a broader set of expressions. + +*** + +### exportRawValues? + +> `optional` **exportRawValues**: `boolean` + +Defined in: [src/utils/javascript/JsExtractor.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L35) + +When true, also export raw values of matched nodes. + +*** + +### forceVarPredeclaration? + +> `optional` **forceVarPredeclaration**: `boolean` + +Defined in: [src/utils/javascript/JsExtractor.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L31) + +When true, emit a single `var` declaration for every variable +encountered, even if it originally had an initializer. + +*** + +### maxDepth? + +> `optional` **maxDepth**: `number` + +Defined in: [src/utils/javascript/JsExtractor.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L20) + +The maximum depth to traverse when emitting dependencies. +If not specified, there is no limit on the depth. + +*** + +### rawValueOnly? + +> `optional` **rawValueOnly**: `string`[] + +Defined in: [src/utils/javascript/JsExtractor.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L39) + +Array of names to skip emitting code/deps for, but still export the raw value. diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/ExtractionConfig.md b/docs/api/youtubei.js/namespaces/Types/interfaces/ExtractionConfig.md new file mode 100644 index 00000000..c66076e9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/ExtractionConfig.md @@ -0,0 +1,57 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / ExtractionConfig + +# Interface: ExtractionConfig + +Defined in: [src/utils/javascript/JsAnalyzer.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L5) + +## Properties + +### collectDependencies? + +> `optional` **collectDependencies**: `boolean` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L14) + +When `false`, dependency resolution is not enforced and extractions are marked as ready immediately +when `stopWhenReady` is true. + +*** + +### friendlyName? + +> `optional` **friendlyName**: `string` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L23) + +Name for easier identification of extractions. + +*** + +### match() + +> **match**: (`node`) => `boolean` \| `Node` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L9) + +Predicate that determines whether the current node should be considered a match. + +#### Parameters + +##### node + +`Node` + +#### Returns + +`boolean` \| `Node` + +*** + +### stopWhenReady? + +> `optional` **stopWhenReady**: `boolean` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L19) + +When `true`, traversal stops once the extraction is matched and all its dependencies (when `collectDependencies=true`) resolve. +Only useful for small functions/vars without too many dependencies. diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/ExtractionState.md b/docs/api/youtubei.js/namespaces/Types/interfaces/ExtractionState.md new file mode 100644 index 00000000..f9a0ab65 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/ExtractionState.md @@ -0,0 +1,61 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / ExtractionState + +# Interface: ExtractionState + +Defined in: [src/utils/javascript/JsAnalyzer.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L41) + +## Properties + +### config + +> **config**: [`ExtractionConfig`](ExtractionConfig.md) + +Defined in: [src/utils/javascript/JsAnalyzer.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L42) + +*** + +### dependencies + +> **dependencies**: `Set`\<`string`\> + +Defined in: [src/utils/javascript/JsAnalyzer.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L45) + +*** + +### dependents + +> **dependents**: `Set`\<`string`\> + +Defined in: [src/utils/javascript/JsAnalyzer.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L46) + +*** + +### matchContext? + +> `optional` **matchContext**: `Node` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L47) + +*** + +### metadata? + +> `optional` **metadata**: [`VariableMetadata`](VariableMetadata.md) + +Defined in: [src/utils/javascript/JsAnalyzer.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L44) + +*** + +### node? + +> `optional` **node**: `Node` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L43) + +*** + +### ready + +> **ready**: `boolean` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:48](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L48) diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/FormatOptions.md b/docs/api/youtubei.js/namespaces/Types/interfaces/FormatOptions.md new file mode 100644 index 00000000..fb313a52 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/FormatOptions.md @@ -0,0 +1,102 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / FormatOptions + +# Interface: FormatOptions + +Defined in: [src/types/FormatUtils.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L7) + +## Extends + +- [`GetVideoInfoOptions`](GetVideoInfoOptions.md) + +## Extended by + +- [`DownloadOptions`](DownloadOptions.md) + +## Properties + +### client? + +> `optional` **client**: [`InnerTubeClient`](../type-aliases/InnerTubeClient.md) + +Defined in: [src/types/GetVideoInfoOptions.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/GetVideoInfoOptions.ts#L7) + +InnerTube client. + +#### Inherited from + +[`GetVideoInfoOptions`](GetVideoInfoOptions.md).[`client`](GetVideoInfoOptions.md#client) + +*** + +### codec? + +> `optional` **codec**: `string` + +Defined in: [src/types/FormatUtils.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L31) + +Video or audio codec, e.g. 'avc', 'vp9', 'av01' for video, 'opus', 'mp4a' for audio + +*** + +### format? + +> `optional` **format**: `string` + +Defined in: [src/types/FormatUtils.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L27) + +File format, use 'any' to download any format + +*** + +### itag? + +> `optional` **itag**: `number` + +Defined in: [src/types/FormatUtils.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L11) + +Video or audio itag + +*** + +### language? + +> `optional` **language**: `string` + +Defined in: [src/types/FormatUtils.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L23) + +Language code, defaults to 'original'. + +*** + +### po\_token? + +> `optional` **po\_token**: `string` + +Defined in: [src/types/GetVideoInfoOptions.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/GetVideoInfoOptions.ts#L12) + +Proof of Origin token, bound to the video ID being requested. +If not provided, session bound token will be used. + +#### Inherited from + +[`GetVideoInfoOptions`](GetVideoInfoOptions.md).[`po_token`](GetVideoInfoOptions.md#po_token) + +*** + +### quality? + +> `optional` **quality**: `string` + +Defined in: [src/types/FormatUtils.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L15) + +Video quality; 360p, 720p, 1080p, etc... also accepts 'best' and 'bestefficiency'. + +*** + +### type? + +> `optional` **type**: `"video"` \| `"audio"` \| `"video+audio"` + +Defined in: [src/types/FormatUtils.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L19) + +Download type, can be: video, audio or video+audio diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/GetVideoInfoOptions.md b/docs/api/youtubei.js/namespaces/Types/interfaces/GetVideoInfoOptions.md new file mode 100644 index 00000000..1091adf8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/GetVideoInfoOptions.md @@ -0,0 +1,30 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / GetVideoInfoOptions + +# Interface: GetVideoInfoOptions + +Defined in: [src/types/GetVideoInfoOptions.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/GetVideoInfoOptions.ts#L3) + +## Extended by + +- [`FormatOptions`](FormatOptions.md) + +## Properties + +### client? + +> `optional` **client**: [`InnerTubeClient`](../type-aliases/InnerTubeClient.md) + +Defined in: [src/types/GetVideoInfoOptions.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/GetVideoInfoOptions.ts#L7) + +InnerTube client. + +*** + +### po\_token? + +> `optional` **po\_token**: `string` + +Defined in: [src/types/GetVideoInfoOptions.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/GetVideoInfoOptions.ts#L12) + +Proof of Origin token, bound to the video ID being requested. +If not provided, session bound token will be used. diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/ICache.md b/docs/api/youtubei.js/namespaces/Types/interfaces/ICache.md new file mode 100644 index 00000000..7733a40f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/ICache.md @@ -0,0 +1,71 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / ICache + +# Interface: ICache + +Defined in: [src/types/Cache.ts:1](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Cache.ts#L1) + +## Properties + +### cache\_dir + +> **cache\_dir**: `string` + +Defined in: [src/types/Cache.ts:2](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Cache.ts#L2) + +## Methods + +### get() + +> **get**(`key`): `Promise`\<`ArrayBuffer` \| `undefined`\> + +Defined in: [src/types/Cache.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Cache.ts#L3) + +#### Parameters + +##### key + +`string` + +#### Returns + +`Promise`\<`ArrayBuffer` \| `undefined`\> + +*** + +### remove() + +> **remove**(`key`): `Promise`\<`void`\> + +Defined in: [src/types/Cache.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Cache.ts#L5) + +#### Parameters + +##### key + +`string` + +#### Returns + +`Promise`\<`void`\> + +*** + +### set() + +> **set**(`key`, `value`): `Promise`\<`void`\> + +Defined in: [src/types/Cache.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Cache.ts#L4) + +#### Parameters + +##### key + +`string` + +##### value + +`ArrayBuffer` + +#### Returns + +`Promise`\<`void`\> diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/ICacheConstructor.md b/docs/api/youtubei.js/namespaces/Types/interfaces/ICacheConstructor.md new file mode 100644 index 00000000..864e375f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/ICacheConstructor.md @@ -0,0 +1,27 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / ICacheConstructor + +# Interface: ICacheConstructor + +Defined in: [src/types/Cache.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Cache.ts#L8) + +## Constructors + +### Constructor + +> **new ICacheConstructor**(`persistent`, `persistent_directory?`): [`ICache`](ICache.md) + +Defined in: [src/types/Cache.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Cache.ts#L9) + +#### Parameters + +##### persistent + +`boolean` + +##### persistent\_directory? + +`string` + +#### Returns + +[`ICache`](ICache.md) diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/PlatformShim.md b/docs/api/youtubei.js/namespaces/Types/interfaces/PlatformShim.md new file mode 100644 index 00000000..af78d1b2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/PlatformShim.md @@ -0,0 +1,403 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / PlatformShim + +# Interface: PlatformShim + +Defined in: [src/types/PlatformShim.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L12) + +## Properties + +### Cache + +> **Cache**: [`ICacheConstructor`](ICacheConstructor.md) + +Defined in: [src/types/PlatformShim.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L15) + +*** + +### CustomEvent + +> **CustomEvent**: \{\<`T`\>(`type`, `eventInitDict?`): `CustomEvent`\<`T`\>; `prototype`: `CustomEvent`; \} + +Defined in: [src/types/PlatformShim.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L26) + +#### Parameters + +##### type + +`string` + +##### eventInitDict? + +`CustomEventInit`\<`T`\> + +#### Returns + +`CustomEvent`\<`T`\> + +#### prototype + +> **prototype**: `CustomEvent` + +*** + +### fetch() + +> **fetch**: \{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \} + +Defined in: [src/types/PlatformShim.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L19) + +#### Call Signature + +> (`input`, `init?`): `Promise`\<`Response`\> + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) + +##### Parameters + +###### input + +`URL` | `RequestInfo` + +###### init? + +`RequestInit` + +##### Returns + +`Promise`\<`Response`\> + +#### Call Signature + +> (`input`, `init?`): `Promise`\<`Response`\> + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) + +##### Parameters + +###### input + +`string` | `URL` | `Request` + +###### init? + +`RequestInit` + +##### Returns + +`Promise`\<`Response`\> + +*** + +### File + +> **File**: \{(`fileBits`, `fileName`, `options?`): `File`; `prototype`: `File`; \} + +Defined in: [src/types/PlatformShim.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L24) + +#### Parameters + +##### fileBits + +`BlobPart`[] + +##### fileName + +`string` + +##### options? + +`FilePropertyBag` + +#### Returns + +`File` + +#### prototype + +> **prototype**: `File` + +*** + +### FormData + +> **FormData**: \{(`form?`, `submitter?`): `FormData`; `prototype`: `FormData`; \} + +Defined in: [src/types/PlatformShim.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L23) + +#### Parameters + +##### form? + +`HTMLFormElement` + +##### submitter? + +`HTMLElement` | `null` + +#### Returns + +`FormData` + +#### prototype + +> **prototype**: `FormData` + +*** + +### Headers + +> **Headers**: \{(`init?`): `Headers`; `prototype`: `Headers`; \} + +Defined in: [src/types/PlatformShim.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L22) + +#### Parameters + +##### init? + +`HeadersInit` + +#### Returns + +`Headers` + +#### prototype + +> **prototype**: `Headers` + +*** + +### ReadableStream + +> **ReadableStream**: \{(`underlyingSource`, `strategy?`): `ReadableStream`\<`Uint8Array`\>; \<`R`\>(`underlyingSource`, `strategy?`): `ReadableStream`\<`R`\>; \<`R`\>(`underlyingSource?`, `strategy?`): `ReadableStream`\<`R`\>; `prototype`: `ReadableStream`; \} + +Defined in: [src/types/PlatformShim.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L25) + +#### Call Signature + +> **new ReadableStream**(`underlyingSource`, `strategy?`): `ReadableStream`\<`Uint8Array`\> + +##### Parameters + +###### underlyingSource + +`UnderlyingByteSource` + +###### strategy? + +###### highWaterMark? + +`number` + +##### Returns + +`ReadableStream`\<`Uint8Array`\> + +#### Call Signature + +> **new ReadableStream**\<`R`\>(`underlyingSource`, `strategy?`): `ReadableStream`\<`R`\> + +##### Parameters + +###### underlyingSource + +`UnderlyingDefaultSource`\<`R`\> + +###### strategy? + +`QueuingStrategy`\<`R`\> + +##### Returns + +`ReadableStream`\<`R`\> + +#### Call Signature + +> **new ReadableStream**\<`R`\>(`underlyingSource?`, `strategy?`): `ReadableStream`\<`R`\> + +##### Parameters + +###### underlyingSource? + +`UnderlyingSource`\<`R`\> + +###### strategy? + +`QueuingStrategy`\<`R`\> + +##### Returns + +`ReadableStream`\<`R`\> + +#### prototype + +> **prototype**: `ReadableStream` + +*** + +### Request + +> **Request**: \{(`input`, `init?`): `Request`; `prototype`: `Request`; \} + +Defined in: [src/types/PlatformShim.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L20) + +#### Parameters + +##### input + +`URL` | `RequestInfo` + +##### init? + +`RequestInit` + +#### Returns + +`Request` + +#### prototype + +> **prototype**: `Request` + +*** + +### Response + +> **Response**: \{(`body?`, `init?`): `Response`; `prototype`: `Response`; `error`: `Response`; `json`: `Response`; `redirect`: `Response`; \} + +Defined in: [src/types/PlatformShim.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L21) + +#### Parameters + +##### body? + +`BodyInit` | `null` + +##### init? + +`ResponseInit` + +#### Returns + +`Response` + +#### prototype + +> **prototype**: `Response` + +#### error() + +> **error**(): `Response` + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error_static) + +##### Returns + +`Response` + +#### json() + +> **json**(`data`, `init?`): `Response` + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) + +##### Parameters + +###### data + +`any` + +###### init? + +`ResponseInit` + +##### Returns + +`Response` + +#### redirect() + +> **redirect**(`url`, `status?`): `Response` + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) + +##### Parameters + +###### url + +`string` | `URL` + +###### status? + +`number` + +##### Returns + +`Response` + +*** + +### runtime + +> **runtime**: [`Runtime`](../type-aliases/Runtime.md) + +Defined in: [src/types/PlatformShim.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L13) + +*** + +### server + +> **server**: `boolean` + +Defined in: [src/types/PlatformShim.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L14) + +## Methods + +### eval() + +> **eval**(`data`, `env`): [`EvalResult`](../type-aliases/EvalResult.md) \| `Promise`\<[`EvalResult`](../type-aliases/EvalResult.md)\> + +Defined in: [src/types/PlatformShim.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L18) + +#### Parameters + +##### data + +[`BuildScriptResult`](BuildScriptResult.md) + +##### env + +`Record`\<`string`, [`VMPrimative`](../type-aliases/VMPrimative.md)\> + +#### Returns + +[`EvalResult`](../type-aliases/EvalResult.md) \| `Promise`\<[`EvalResult`](../type-aliases/EvalResult.md)\> + +*** + +### sha1Hash() + +> **sha1Hash**(`data`): `Promise`\<`string`\> + +Defined in: [src/types/PlatformShim.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L16) + +#### Parameters + +##### data + +`string` + +#### Returns + +`Promise`\<`string`\> + +*** + +### uuidv4() + +> **uuidv4**(): `string` + +Defined in: [src/types/PlatformShim.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L17) + +#### Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/SideEffectPolicyOptions.md b/docs/api/youtubei.js/namespaces/Types/interfaces/SideEffectPolicyOptions.md new file mode 100644 index 00000000..77bc89e4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/SideEffectPolicyOptions.md @@ -0,0 +1,16 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / SideEffectPolicyOptions + +# Interface: SideEffectPolicyOptions + +Defined in: [src/utils/javascript/JsExtractor.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L7) + +## Properties + +### mode? + +> `optional` **mode**: [`SideEffectMode`](../type-aliases/SideEffectMode.md) + +Defined in: [src/utils/javascript/JsExtractor.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L12) + +Determines how strictly side-effect detection should behave. +Use `"loose"` to allow benign computed expressions. diff --git a/docs/api/youtubei.js/namespaces/Types/interfaces/VariableMetadata.md b/docs/api/youtubei.js/namespaces/Types/interfaces/VariableMetadata.md new file mode 100644 index 00000000..06138e04 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/interfaces/VariableMetadata.md @@ -0,0 +1,45 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / VariableMetadata + +# Interface: VariableMetadata + +Defined in: [src/utils/javascript/JsAnalyzer.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L33) + +## Properties + +### dependencies + +> **dependencies**: `Set`\<`string`\> + +Defined in: [src/utils/javascript/JsAnalyzer.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L36) + +*** + +### dependents + +> **dependents**: `Set`\<`string`\> + +Defined in: [src/utils/javascript/JsAnalyzer.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L37) + +*** + +### name + +> **name**: `string` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L34) + +*** + +### node? + +> `optional` **node**: `any` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L35) + +*** + +### predeclared + +> **predeclared**: `boolean` + +Defined in: [src/utils/javascript/JsAnalyzer.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L38) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/Duration.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/Duration.md new file mode 100644 index 00000000..41182042 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/Duration.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / Duration + +# Type Alias: Duration + +> **Duration** = `"all"` \| `"short"` \| `"medium"` \| `"long"` + +Defined in: [src/types/Misc.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L9) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/EngagementType.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/EngagementType.md new file mode 100644 index 00000000..8cbb666a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/EngagementType.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / EngagementType + +# Type Alias: EngagementType + +> **EngagementType** = `"ENGAGEMENT_TYPE_UNBOUND"` \| `"ENGAGEMENT_TYPE_VIDEO_LIKE"` \| `"ENGAGEMENT_TYPE_VIDEO_DISLIKE"` \| `"ENGAGEMENT_TYPE_SUBSCRIBE"` \| `"ENGAGEMENT_TYPE_PLAYBACK"` \| `"ENGAGEMENT_TYPE_YPC_GET_PREMIUM_PAGE"` \| `"ENGAGEMENT_TYPE_YPC_GET_DOWNLOAD_ACTION"` + +Defined in: [src/types/Misc.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L5) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/EvalResult.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/EvalResult.md new file mode 100644 index 00000000..be7c0284 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/EvalResult.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / EvalResult + +# Type Alias: EvalResult + +> **EvalResult** = \{\[`key`: `string`\]: `any`; \} \| `void` + +Defined in: [src/types/PlatformShim.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L10) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/ExtractionMatch.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/ExtractionMatch.md new file mode 100644 index 00000000..a9634d2c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/ExtractionMatch.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / ExtractionMatch + +# Type Alias: ExtractionMatch + +> **ExtractionMatch** = [`ExtractionState`](../interfaces/ExtractionState.md) + +Defined in: [src/utils/javascript/JsAnalyzer.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsAnalyzer.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/Feature.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/Feature.md new file mode 100644 index 00000000..d9bc7734 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/Feature.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / Feature + +# Type Alias: Feature + +> **Feature** = `"hd"` \| `"subtitles"` \| `"creative_commons"` \| `"3d"` \| `"live"` \| `"purchased"` \| `"4k"` \| `"360"` \| `"location"` \| `"hdr"` \| `"vr180"` + +Defined in: [src/types/Misc.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L11) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/FetchFunction.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/FetchFunction.md new file mode 100644 index 00000000..de9d6216 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/FetchFunction.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / FetchFunction + +# Type Alias: FetchFunction + +> **FetchFunction** = *typeof* `fetch` + +Defined in: [src/types/PlatformShim.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L6) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/FormatFilter.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/FormatFilter.md new file mode 100644 index 00000000..460e4635 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/FormatFilter.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / FormatFilter + +# Type Alias: FormatFilter() + +> **FormatFilter** = (`format`) => `boolean` + +Defined in: [src/types/FormatUtils.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L5) + +## Parameters + +### format + +[`Format`](../../Misc/classes/Format.md) + +## Returns + +`boolean` diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/InnerTubeClient.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/InnerTubeClient.md new file mode 100644 index 00000000..5b053d9c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/InnerTubeClient.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / InnerTubeClient + +# Type Alias: InnerTubeClient + +> **InnerTubeClient** = `"IOS"` \| `"WEB"` \| `"MWEB"` \| `"ANDROID"` \| `"YTMUSIC"` \| `"YTMUSIC_ANDROID"` \| `"YTSTUDIO_ANDROID"` \| `"TV"` \| `"TV_SIMPLY"` \| `"TV_EMBEDDED"` \| `"YTKIDS"` \| `"WEB_EMBEDDED"` \| `"WEB_CREATOR"` + +Defined in: [src/types/Misc.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L4) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/InnerTubeConfig.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/InnerTubeConfig.md new file mode 100644 index 00000000..aeb83bd0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/InnerTubeConfig.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / InnerTubeConfig + +# Type Alias: InnerTubeConfig + +> **InnerTubeConfig** = [`SessionOptions`](../../../../type-aliases/SessionOptions.md) + +Defined in: [src/types/Misc.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L3) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/MusicSearchFilters.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/MusicSearchFilters.md new file mode 100644 index 00000000..ebbc4237 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/MusicSearchFilters.md @@ -0,0 +1,15 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / MusicSearchFilters + +# Type Alias: MusicSearchFilters + +> **MusicSearchFilters** = `object` + +Defined in: [src/types/Misc.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L42) + +## Properties + +### type? + +> `optional` **type**: [`MusicSearchType`](MusicSearchType.md) + +Defined in: [src/types/Misc.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L43) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/MusicSearchType.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/MusicSearchType.md new file mode 100644 index 00000000..ce208e69 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/MusicSearchType.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / MusicSearchType + +# Type Alias: MusicSearchType + +> **MusicSearchType** = `"all"` \| `"song"` \| `"video"` \| `"album"` \| `"playlist"` \| `"artist"` + +Defined in: [src/types/Misc.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L40) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/Runtime.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/Runtime.md new file mode 100644 index 00000000..9436de85 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/Runtime.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / Runtime + +# Type Alias: Runtime + +> **Runtime** = `"deno"` \| `"node"` \| `"browser"` \| `"cf-worker"` \| `"unknown"` \| `"react-native"` + +Defined in: [src/types/PlatformShim.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L4) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/SearchFilters.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/SearchFilters.md new file mode 100644 index 00000000..e170d7fa --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/SearchFilters.md @@ -0,0 +1,47 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / SearchFilters + +# Type Alias: SearchFilters + +> **SearchFilters** = `object` + +Defined in: [src/types/Misc.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L13) + +## Properties + +### duration? + +> `optional` **duration**: [`Duration`](Duration.md) + +Defined in: [src/types/Misc.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L16) + +*** + +### features? + +> `optional` **features**: [`Feature`](Feature.md)[] + +Defined in: [src/types/Misc.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L18) + +*** + +### sort\_by? + +> `optional` **sort\_by**: [`SortBy`](SortBy.md) + +Defined in: [src/types/Misc.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L17) + +*** + +### type? + +> `optional` **type**: [`SearchType`](SearchType.md) + +Defined in: [src/types/Misc.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L15) + +*** + +### upload\_date? + +> `optional` **upload\_date**: [`UploadDate`](UploadDate.md) + +Defined in: [src/types/Misc.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L14) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/SearchType.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/SearchType.md new file mode 100644 index 00000000..609d5524 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/SearchType.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / SearchType + +# Type Alias: SearchType + +> **SearchType** = `"all"` \| `"video"` \| `"channel"` \| `"playlist"` \| `"movie"` + +Defined in: [src/types/Misc.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L8) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/SideEffectMode.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/SideEffectMode.md new file mode 100644 index 00000000..5a39594c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/SideEffectMode.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / SideEffectMode + +# Type Alias: SideEffectMode + +> **SideEffectMode** = `"strict"` \| `"loose"` + +Defined in: [src/utils/javascript/JsExtractor.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/javascript/JsExtractor.ts#L5) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/SortBy.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/SortBy.md new file mode 100644 index 00000000..5e8ac90c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/SortBy.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / SortBy + +# Type Alias: SortBy + +> **SortBy** = `"relevance"` \| `"rating"` \| `"upload_date"` \| `"view_count"` + +Defined in: [src/types/Misc.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L10) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/URLTransformer.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/URLTransformer.md new file mode 100644 index 00000000..f1504b93 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/URLTransformer.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / URLTransformer + +# Type Alias: URLTransformer() + +> **URLTransformer** = (`url`) => `URL` + +Defined in: [src/types/FormatUtils.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/FormatUtils.ts#L4) + +## Parameters + +### url + +`URL` + +## Returns + +`URL` diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/UpdateVideoMetadataOptions.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/UpdateVideoMetadataOptions.md new file mode 100644 index 00000000..7096297b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/UpdateVideoMetadataOptions.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / UpdateVideoMetadataOptions + +# Type Alias: UpdateVideoMetadataOptions + +> **UpdateVideoMetadataOptions** = `Partial`\<\{ `age_restricted`: `boolean`; `category`: `number`; `description`: `string`; `license`: `string`; `made_for_kids`: `boolean`; `privacy`: `"PUBLIC"` \| `"PRIVATE"` \| `"UNLISTED"`; `tags`: `string`[]; `thumbnail`: `Uint8Array`; `title`: `string`; \}\> + +Defined in: [src/types/Misc.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L21) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/UploadDate.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/UploadDate.md new file mode 100644 index 00000000..564edf8c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/UploadDate.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / UploadDate + +# Type Alias: UploadDate + +> **UploadDate** = `"all"` \| `"hour"` \| `"today"` \| `"week"` \| `"month"` \| `"year"` + +Defined in: [src/types/Misc.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L7) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/UploadedVideoMetadataOptions.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/UploadedVideoMetadataOptions.md new file mode 100644 index 00000000..5f8cc25c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/UploadedVideoMetadataOptions.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / UploadedVideoMetadataOptions + +# Type Alias: UploadedVideoMetadataOptions + +> **UploadedVideoMetadataOptions** = `Partial`\<\{ `description`: `string`; `is_draft`: `boolean`; `privacy`: `"PUBLIC"` \| `"PRIVATE"` \| `"UNLISTED"`; `title`: `string`; \}\> + +Defined in: [src/types/Misc.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/Misc.ts#L33) diff --git a/docs/api/youtubei.js/namespaces/Types/type-aliases/VMPrimative.md b/docs/api/youtubei.js/namespaces/Types/type-aliases/VMPrimative.md new file mode 100644 index 00000000..74d29844 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Types/type-aliases/VMPrimative.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Types](../README.md) / VMPrimative + +# Type Alias: VMPrimative + +> **VMPrimative** = `string` \| `number` \| `boolean` \| `null` \| `undefined` + +Defined in: [src/types/PlatformShim.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/types/PlatformShim.ts#L8) diff --git a/docs/api/namespaces/Utils/README.md b/docs/api/youtubei.js/namespaces/Utils/README.md similarity index 85% rename from docs/api/namespaces/Utils/README.md rename to docs/api/youtubei.js/namespaces/Utils/README.md index 33a96263..cb5ce1d3 100644 --- a/docs/api/namespaces/Utils/README.md +++ b/docs/api/youtubei.js/namespaces/Utils/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / Utils +[youtubei.js](../../../README.md) / Utils # Utils -## Index - -### Classes +## Classes - [ChannelError](classes/ChannelError.md) - [InnertubeError](classes/InnertubeError.md) @@ -14,15 +12,18 @@ - [PlayerError](classes/PlayerError.md) - [SessionError](classes/SessionError.md) -### Type Aliases +## Type Aliases - [DeviceCategory](type-aliases/DeviceCategory.md) -### Functions +## Variables + +- [debugFetch](variables/debugFetch.md) + +## Functions - [base64ToU8](functions/base64ToU8.md) - [concatMemos](functions/concatMemos.md) -- [debugFetch](functions/debugFetch.md) - [deepCompare](functions/deepCompare.md) - [escapeStringRegexp](functions/escapeStringRegexp.md) - [generateRandomString](functions/generateRandomString.md) @@ -41,4 +42,4 @@ ### Platform -Re-exports [Platform](../../classes/Platform.md) +Re-exports [Platform](../../../classes/Platform.md) diff --git a/docs/api/namespaces/Utils/classes/ChannelError.md b/docs/api/youtubei.js/namespaces/Utils/classes/ChannelError.md similarity index 70% rename from docs/api/namespaces/Utils/classes/ChannelError.md rename to docs/api/youtubei.js/namespaces/Utils/classes/ChannelError.md index 9bb362ba..3711cd6f 100644 --- a/docs/api/namespaces/Utils/classes/ChannelError.md +++ b/docs/api/youtubei.js/namespaces/Utils/classes/ChannelError.md @@ -1,117 +1,115 @@ -[youtubei.js](../../../README.md) / [Utils](../README.md) / ChannelError +[youtubei.js](../../../../README.md) / [Utils](../README.md) / ChannelError # Class: ChannelError +Defined in: [src/utils/Utils.ts:60](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L60) + ## Extends - `Error` ## Constructors -### new ChannelError() +### Constructor -> **new ChannelError**(`message`?): [`ChannelError`](ChannelError.md) +> **new ChannelError**(`message?`): `ChannelError` + +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1082 #### Parameters -• **message?**: `string` +##### message? + +`string` #### Returns -[`ChannelError`](ChannelError.md) +`ChannelError` #### Inherited from `Error.constructor` -#### Defined in +### Constructor -node\_modules/typescript/lib/lib.es5.d.ts:1082 +> **new ChannelError**(`message?`, `options?`): `ChannelError` -### new ChannelError() - -> **new ChannelError**(`message`?, `options`?): [`ChannelError`](ChannelError.md) +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1082 #### Parameters -• **message?**: `string` +##### message? -• **options?**: `ErrorOptions` +`string` + +##### options? + +`ErrorOptions` #### Returns -[`ChannelError`](ChannelError.md) +`ChannelError` #### Inherited from `Error.constructor` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1082 - ## Properties ### cause? > `optional` **cause**: `unknown` +Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + #### Inherited from `Error.cause` -#### Defined in - -node\_modules/typescript/lib/lib.es2022.error.d.ts:24 - *** ### message > **message**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077 + #### Inherited from `Error.message` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1077 - *** ### name > **name**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 + #### Inherited from `Error.name` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1076 - *** ### stack? > `optional` **stack**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078 + #### Inherited from `Error.stack` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1078 - *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` +Defined in: node\_modules/@types/node/globals.d.ts:162 + The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). @@ -126,15 +124,13 @@ not capture any frames. `Error.stackTraceLimit` -#### Defined in - -node\_modules/@types/node/globals.d.ts:162 - ## Methods ### captureStackTrace() -> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/@types/node/globals.d.ts:146 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which @@ -182,9 +178,13 @@ a(); #### Parameters -• **targetObject**: `object` +##### targetObject -• **constructorOpt?**: `Function` +`object` + +##### constructorOpt? + +`Function` #### Returns @@ -194,21 +194,23 @@ a(); `Error.captureStackTrace` -#### Defined in - -node\_modules/@types/node/globals.d.ts:146 - *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` +Defined in: node\_modules/@types/node/globals.d.ts:150 + #### Parameters -• **err**: `Error` +##### err -• **stackTraces**: `CallSite`[] +`Error` + +##### stackTraces + +`CallSite`[] #### Returns @@ -221,7 +223,3 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` - -#### Defined in - -node\_modules/@types/node/globals.d.ts:150 diff --git a/docs/api/namespaces/Utils/classes/InnertubeError.md b/docs/api/youtubei.js/namespaces/Utils/classes/InnertubeError.md similarity index 66% rename from docs/api/namespaces/Utils/classes/InnertubeError.md rename to docs/api/youtubei.js/namespaces/Utils/classes/InnertubeError.md index 29ac37ad..cdc86d0a 100644 --- a/docs/api/namespaces/Utils/classes/InnertubeError.md +++ b/docs/api/youtubei.js/namespaces/Utils/classes/InnertubeError.md @@ -1,7 +1,9 @@ -[youtubei.js](../../../README.md) / [Utils](../README.md) / InnertubeError +[youtubei.js](../../../../README.md) / [Utils](../README.md) / InnertubeError # Class: InnertubeError +Defined in: [src/utils/Utils.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L28) + ## Extends - `Error` @@ -14,51 +16,49 @@ ## Constructors -### new InnertubeError() +### Constructor -> **new InnertubeError**(`message`, `info`?): [`InnertubeError`](InnertubeError.md) +> **new InnertubeError**(`message`, `info?`): `InnertubeError` + +Defined in: [src/utils/Utils.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L33) #### Parameters -• **message**: `string` +##### message -• **info?**: `any` +`string` + +##### info? + +`any` #### Returns -[`InnertubeError`](InnertubeError.md) +`InnertubeError` #### Overrides `Error.constructor` -#### Defined in - -[src/utils/Utils.ts:33](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L33) - ## Properties ### cause? > `optional` **cause**: `unknown` +Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + #### Inherited from `Error.cause` -#### Defined in - -node\_modules/typescript/lib/lib.es2022.error.d.ts:24 - *** ### date > **date**: `Date` -#### Defined in - -[src/utils/Utils.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L29) +Defined in: [src/utils/Utils.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L29) *** @@ -66,9 +66,7 @@ node\_modules/typescript/lib/lib.es2022.error.d.ts:24 > `optional` **info**: `any` -#### Defined in - -[src/utils/Utils.ts:31](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L31) +Defined in: [src/utils/Utils.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L31) *** @@ -76,51 +74,43 @@ node\_modules/typescript/lib/lib.es2022.error.d.ts:24 > **message**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077 + #### Inherited from `Error.message` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1077 - *** ### name > **name**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 + #### Inherited from `Error.name` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1076 - *** ### stack? > `optional` **stack**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078 + #### Inherited from `Error.stack` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1078 - *** ### version > **version**: `string` -#### Defined in - -[src/utils/Utils.ts:30](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L30) +Defined in: [src/utils/Utils.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L30) *** @@ -128,6 +118,8 @@ node\_modules/typescript/lib/lib.es5.d.ts:1078 > `static` **stackTraceLimit**: `number` +Defined in: node\_modules/@types/node/globals.d.ts:162 + The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). @@ -142,15 +134,13 @@ not capture any frames. `Error.stackTraceLimit` -#### Defined in - -node\_modules/@types/node/globals.d.ts:162 - ## Methods ### captureStackTrace() -> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/@types/node/globals.d.ts:146 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which @@ -198,9 +188,13 @@ a(); #### Parameters -• **targetObject**: `object` +##### targetObject -• **constructorOpt?**: `Function` +`object` + +##### constructorOpt? + +`Function` #### Returns @@ -210,21 +204,23 @@ a(); `Error.captureStackTrace` -#### Defined in - -node\_modules/@types/node/globals.d.ts:146 - *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` +Defined in: node\_modules/@types/node/globals.d.ts:150 + #### Parameters -• **err**: `Error` +##### err -• **stackTraces**: `CallSite`[] +`Error` + +##### stackTraces + +`CallSite`[] #### Returns @@ -237,7 +233,3 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` - -#### Defined in - -node\_modules/@types/node/globals.d.ts:150 diff --git a/docs/api/namespaces/Utils/classes/MissingParamError.md b/docs/api/youtubei.js/namespaces/Utils/classes/MissingParamError.md similarity index 70% rename from docs/api/namespaces/Utils/classes/MissingParamError.md rename to docs/api/youtubei.js/namespaces/Utils/classes/MissingParamError.md index 1e24c86a..3249143e 100644 --- a/docs/api/namespaces/Utils/classes/MissingParamError.md +++ b/docs/api/youtubei.js/namespaces/Utils/classes/MissingParamError.md @@ -1,34 +1,38 @@ -[youtubei.js](../../../README.md) / [Utils](../README.md) / MissingParamError +[youtubei.js](../../../../README.md) / [Utils](../README.md) / MissingParamError # Class: MissingParamError +Defined in: [src/utils/Utils.ts:48](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L48) + ## Extends - [`InnertubeError`](InnertubeError.md) ## Constructors -### new MissingParamError() +### Constructor -> **new MissingParamError**(`message`, `info`?): [`MissingParamError`](MissingParamError.md) +> **new MissingParamError**(`message`, `info?`): `MissingParamError` + +Defined in: [src/utils/Utils.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L33) #### Parameters -• **message**: `string` +##### message -• **info?**: `any` +`string` + +##### info? + +`any` #### Returns -[`MissingParamError`](MissingParamError.md) +`MissingParamError` #### Inherited from -[`InnertubeError`](InnertubeError.md).[`constructor`](InnertubeError.md#constructors) - -#### Defined in - -[src/utils/Utils.ts:33](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L33) +[`InnertubeError`](InnertubeError.md).[`constructor`](InnertubeError.md#constructor) ## Properties @@ -36,104 +40,92 @@ > `optional` **cause**: `unknown` +Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`cause`](InnertubeError.md#cause) -#### Defined in - -node\_modules/typescript/lib/lib.es2022.error.d.ts:24 - *** ### date > **date**: `Date` +Defined in: [src/utils/Utils.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L29) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`date`](InnertubeError.md#date) -#### Defined in - -[src/utils/Utils.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L29) - *** ### info? > `optional` **info**: `any` +Defined in: [src/utils/Utils.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L31) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`info`](InnertubeError.md#info) -#### Defined in - -[src/utils/Utils.ts:31](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L31) - *** ### message > **message**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`message`](InnertubeError.md#message) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1077 - *** ### name > **name**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`name`](InnertubeError.md#name) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1076 - *** ### stack? > `optional` **stack**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`stack`](InnertubeError.md#stack) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1078 - *** ### version > **version**: `string` +Defined in: [src/utils/Utils.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L30) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`version`](InnertubeError.md#version) -#### Defined in - -[src/utils/Utils.ts:30](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L30) - *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` +Defined in: node\_modules/@types/node/globals.d.ts:162 + The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). @@ -148,15 +140,13 @@ not capture any frames. [`InnertubeError`](InnertubeError.md).[`stackTraceLimit`](InnertubeError.md#stacktracelimit) -#### Defined in - -node\_modules/@types/node/globals.d.ts:162 - ## Methods ### captureStackTrace() -> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/@types/node/globals.d.ts:146 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which @@ -204,9 +194,13 @@ a(); #### Parameters -• **targetObject**: `object` +##### targetObject -• **constructorOpt?**: `Function` +`object` + +##### constructorOpt? + +`Function` #### Returns @@ -216,21 +210,23 @@ a(); [`InnertubeError`](InnertubeError.md).[`captureStackTrace`](InnertubeError.md#capturestacktrace) -#### Defined in - -node\_modules/@types/node/globals.d.ts:146 - *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` +Defined in: node\_modules/@types/node/globals.d.ts:150 + #### Parameters -• **err**: `Error` +##### err -• **stackTraces**: `CallSite`[] +`Error` + +##### stackTraces + +`CallSite`[] #### Returns @@ -243,7 +239,3 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`InnertubeError`](InnertubeError.md).[`prepareStackTrace`](InnertubeError.md#preparestacktrace) - -#### Defined in - -node\_modules/@types/node/globals.d.ts:150 diff --git a/docs/api/namespaces/Utils/classes/OAuth2Error.md b/docs/api/youtubei.js/namespaces/Utils/classes/OAuth2Error.md similarity index 70% rename from docs/api/namespaces/Utils/classes/OAuth2Error.md rename to docs/api/youtubei.js/namespaces/Utils/classes/OAuth2Error.md index 177b129a..c4e9ab05 100644 --- a/docs/api/namespaces/Utils/classes/OAuth2Error.md +++ b/docs/api/youtubei.js/namespaces/Utils/classes/OAuth2Error.md @@ -1,34 +1,38 @@ -[youtubei.js](../../../README.md) / [Utils](../README.md) / OAuth2Error +[youtubei.js](../../../../README.md) / [Utils](../README.md) / OAuth2Error # Class: OAuth2Error +Defined in: [src/utils/Utils.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L51) + ## Extends - [`InnertubeError`](InnertubeError.md) ## Constructors -### new OAuth2Error() +### Constructor -> **new OAuth2Error**(`message`, `info`?): [`OAuth2Error`](OAuth2Error.md) +> **new OAuth2Error**(`message`, `info?`): `OAuth2Error` + +Defined in: [src/utils/Utils.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L33) #### Parameters -• **message**: `string` +##### message -• **info?**: `any` +`string` + +##### info? + +`any` #### Returns -[`OAuth2Error`](OAuth2Error.md) +`OAuth2Error` #### Inherited from -[`InnertubeError`](InnertubeError.md).[`constructor`](InnertubeError.md#constructors) - -#### Defined in - -[src/utils/Utils.ts:33](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L33) +[`InnertubeError`](InnertubeError.md).[`constructor`](InnertubeError.md#constructor) ## Properties @@ -36,104 +40,92 @@ > `optional` **cause**: `unknown` +Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`cause`](InnertubeError.md#cause) -#### Defined in - -node\_modules/typescript/lib/lib.es2022.error.d.ts:24 - *** ### date > **date**: `Date` +Defined in: [src/utils/Utils.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L29) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`date`](InnertubeError.md#date) -#### Defined in - -[src/utils/Utils.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L29) - *** ### info? > `optional` **info**: `any` +Defined in: [src/utils/Utils.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L31) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`info`](InnertubeError.md#info) -#### Defined in - -[src/utils/Utils.ts:31](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L31) - *** ### message > **message**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`message`](InnertubeError.md#message) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1077 - *** ### name > **name**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`name`](InnertubeError.md#name) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1076 - *** ### stack? > `optional` **stack**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`stack`](InnertubeError.md#stack) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1078 - *** ### version > **version**: `string` +Defined in: [src/utils/Utils.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L30) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`version`](InnertubeError.md#version) -#### Defined in - -[src/utils/Utils.ts:30](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L30) - *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` +Defined in: node\_modules/@types/node/globals.d.ts:162 + The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). @@ -148,15 +140,13 @@ not capture any frames. [`InnertubeError`](InnertubeError.md).[`stackTraceLimit`](InnertubeError.md#stacktracelimit) -#### Defined in - -node\_modules/@types/node/globals.d.ts:162 - ## Methods ### captureStackTrace() -> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/@types/node/globals.d.ts:146 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which @@ -204,9 +194,13 @@ a(); #### Parameters -• **targetObject**: `object` +##### targetObject -• **constructorOpt?**: `Function` +`object` + +##### constructorOpt? + +`Function` #### Returns @@ -216,21 +210,23 @@ a(); [`InnertubeError`](InnertubeError.md).[`captureStackTrace`](InnertubeError.md#capturestacktrace) -#### Defined in - -node\_modules/@types/node/globals.d.ts:146 - *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` +Defined in: node\_modules/@types/node/globals.d.ts:150 + #### Parameters -• **err**: `Error` +##### err -• **stackTraces**: `CallSite`[] +`Error` + +##### stackTraces + +`CallSite`[] #### Returns @@ -243,7 +239,3 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`InnertubeError`](InnertubeError.md).[`prepareStackTrace`](InnertubeError.md#preparestacktrace) - -#### Defined in - -node\_modules/@types/node/globals.d.ts:150 diff --git a/docs/api/namespaces/Utils/classes/ParsingError.md b/docs/api/youtubei.js/namespaces/Utils/classes/ParsingError.md similarity index 70% rename from docs/api/namespaces/Utils/classes/ParsingError.md rename to docs/api/youtubei.js/namespaces/Utils/classes/ParsingError.md index 2997601c..edbf71fc 100644 --- a/docs/api/namespaces/Utils/classes/ParsingError.md +++ b/docs/api/youtubei.js/namespaces/Utils/classes/ParsingError.md @@ -1,34 +1,38 @@ -[youtubei.js](../../../README.md) / [Utils](../README.md) / ParsingError +[youtubei.js](../../../../README.md) / [Utils](../README.md) / ParsingError # Class: ParsingError +Defined in: [src/utils/Utils.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L45) + ## Extends - [`InnertubeError`](InnertubeError.md) ## Constructors -### new ParsingError() +### Constructor -> **new ParsingError**(`message`, `info`?): [`ParsingError`](ParsingError.md) +> **new ParsingError**(`message`, `info?`): `ParsingError` + +Defined in: [src/utils/Utils.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L33) #### Parameters -• **message**: `string` +##### message -• **info?**: `any` +`string` + +##### info? + +`any` #### Returns -[`ParsingError`](ParsingError.md) +`ParsingError` #### Inherited from -[`InnertubeError`](InnertubeError.md).[`constructor`](InnertubeError.md#constructors) - -#### Defined in - -[src/utils/Utils.ts:33](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L33) +[`InnertubeError`](InnertubeError.md).[`constructor`](InnertubeError.md#constructor) ## Properties @@ -36,104 +40,92 @@ > `optional` **cause**: `unknown` +Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`cause`](InnertubeError.md#cause) -#### Defined in - -node\_modules/typescript/lib/lib.es2022.error.d.ts:24 - *** ### date > **date**: `Date` +Defined in: [src/utils/Utils.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L29) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`date`](InnertubeError.md#date) -#### Defined in - -[src/utils/Utils.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L29) - *** ### info? > `optional` **info**: `any` +Defined in: [src/utils/Utils.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L31) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`info`](InnertubeError.md#info) -#### Defined in - -[src/utils/Utils.ts:31](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L31) - *** ### message > **message**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`message`](InnertubeError.md#message) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1077 - *** ### name > **name**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`name`](InnertubeError.md#name) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1076 - *** ### stack? > `optional` **stack**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078 + #### Inherited from [`InnertubeError`](InnertubeError.md).[`stack`](InnertubeError.md#stack) -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1078 - *** ### version > **version**: `string` +Defined in: [src/utils/Utils.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L30) + #### Inherited from [`InnertubeError`](InnertubeError.md).[`version`](InnertubeError.md#version) -#### Defined in - -[src/utils/Utils.ts:30](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L30) - *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` +Defined in: node\_modules/@types/node/globals.d.ts:162 + The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). @@ -148,15 +140,13 @@ not capture any frames. [`InnertubeError`](InnertubeError.md).[`stackTraceLimit`](InnertubeError.md#stacktracelimit) -#### Defined in - -node\_modules/@types/node/globals.d.ts:162 - ## Methods ### captureStackTrace() -> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/@types/node/globals.d.ts:146 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which @@ -204,9 +194,13 @@ a(); #### Parameters -• **targetObject**: `object` +##### targetObject -• **constructorOpt?**: `Function` +`object` + +##### constructorOpt? + +`Function` #### Returns @@ -216,21 +210,23 @@ a(); [`InnertubeError`](InnertubeError.md).[`captureStackTrace`](InnertubeError.md#capturestacktrace) -#### Defined in - -node\_modules/@types/node/globals.d.ts:146 - *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` +Defined in: node\_modules/@types/node/globals.d.ts:150 + #### Parameters -• **err**: `Error` +##### err -• **stackTraces**: `CallSite`[] +`Error` + +##### stackTraces + +`CallSite`[] #### Returns @@ -243,7 +239,3 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`InnertubeError`](InnertubeError.md).[`prepareStackTrace`](InnertubeError.md#preparestacktrace) - -#### Defined in - -node\_modules/@types/node/globals.d.ts:150 diff --git a/docs/api/namespaces/Utils/classes/PlayerError.md b/docs/api/youtubei.js/namespaces/Utils/classes/PlayerError.md similarity index 70% rename from docs/api/namespaces/Utils/classes/PlayerError.md rename to docs/api/youtubei.js/namespaces/Utils/classes/PlayerError.md index 97a959c3..7d7cbe90 100644 --- a/docs/api/namespaces/Utils/classes/PlayerError.md +++ b/docs/api/youtubei.js/namespaces/Utils/classes/PlayerError.md @@ -1,117 +1,115 @@ -[youtubei.js](../../../README.md) / [Utils](../README.md) / PlayerError +[youtubei.js](../../../../README.md) / [Utils](../README.md) / PlayerError # Class: PlayerError +Defined in: [src/utils/Utils.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L54) + ## Extends - `Error` ## Constructors -### new PlayerError() +### Constructor -> **new PlayerError**(`message`?): [`PlayerError`](PlayerError.md) +> **new PlayerError**(`message?`): `PlayerError` + +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1082 #### Parameters -• **message?**: `string` +##### message? + +`string` #### Returns -[`PlayerError`](PlayerError.md) +`PlayerError` #### Inherited from `Error.constructor` -#### Defined in +### Constructor -node\_modules/typescript/lib/lib.es5.d.ts:1082 +> **new PlayerError**(`message?`, `options?`): `PlayerError` -### new PlayerError() - -> **new PlayerError**(`message`?, `options`?): [`PlayerError`](PlayerError.md) +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1082 #### Parameters -• **message?**: `string` +##### message? -• **options?**: `ErrorOptions` +`string` + +##### options? + +`ErrorOptions` #### Returns -[`PlayerError`](PlayerError.md) +`PlayerError` #### Inherited from `Error.constructor` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1082 - ## Properties ### cause? > `optional` **cause**: `unknown` +Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + #### Inherited from `Error.cause` -#### Defined in - -node\_modules/typescript/lib/lib.es2022.error.d.ts:24 - *** ### message > **message**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077 + #### Inherited from `Error.message` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1077 - *** ### name > **name**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 + #### Inherited from `Error.name` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1076 - *** ### stack? > `optional` **stack**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078 + #### Inherited from `Error.stack` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1078 - *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` +Defined in: node\_modules/@types/node/globals.d.ts:162 + The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). @@ -126,15 +124,13 @@ not capture any frames. `Error.stackTraceLimit` -#### Defined in - -node\_modules/@types/node/globals.d.ts:162 - ## Methods ### captureStackTrace() -> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/@types/node/globals.d.ts:146 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which @@ -182,9 +178,13 @@ a(); #### Parameters -• **targetObject**: `object` +##### targetObject -• **constructorOpt?**: `Function` +`object` + +##### constructorOpt? + +`Function` #### Returns @@ -194,21 +194,23 @@ a(); `Error.captureStackTrace` -#### Defined in - -node\_modules/@types/node/globals.d.ts:146 - *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` +Defined in: node\_modules/@types/node/globals.d.ts:150 + #### Parameters -• **err**: `Error` +##### err -• **stackTraces**: `CallSite`[] +`Error` + +##### stackTraces + +`CallSite`[] #### Returns @@ -221,7 +223,3 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` - -#### Defined in - -node\_modules/@types/node/globals.d.ts:150 diff --git a/docs/api/namespaces/Utils/classes/SessionError.md b/docs/api/youtubei.js/namespaces/Utils/classes/SessionError.md similarity index 70% rename from docs/api/namespaces/Utils/classes/SessionError.md rename to docs/api/youtubei.js/namespaces/Utils/classes/SessionError.md index 78cbce6d..d580eb33 100644 --- a/docs/api/namespaces/Utils/classes/SessionError.md +++ b/docs/api/youtubei.js/namespaces/Utils/classes/SessionError.md @@ -1,117 +1,115 @@ -[youtubei.js](../../../README.md) / [Utils](../README.md) / SessionError +[youtubei.js](../../../../README.md) / [Utils](../README.md) / SessionError # Class: SessionError +Defined in: [src/utils/Utils.ts:57](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L57) + ## Extends - `Error` ## Constructors -### new SessionError() +### Constructor -> **new SessionError**(`message`?): [`SessionError`](SessionError.md) +> **new SessionError**(`message?`): `SessionError` + +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1082 #### Parameters -• **message?**: `string` +##### message? + +`string` #### Returns -[`SessionError`](SessionError.md) +`SessionError` #### Inherited from `Error.constructor` -#### Defined in +### Constructor -node\_modules/typescript/lib/lib.es5.d.ts:1082 +> **new SessionError**(`message?`, `options?`): `SessionError` -### new SessionError() - -> **new SessionError**(`message`?, `options`?): [`SessionError`](SessionError.md) +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1082 #### Parameters -• **message?**: `string` +##### message? -• **options?**: `ErrorOptions` +`string` + +##### options? + +`ErrorOptions` #### Returns -[`SessionError`](SessionError.md) +`SessionError` #### Inherited from `Error.constructor` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1082 - ## Properties ### cause? > `optional` **cause**: `unknown` +Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + #### Inherited from `Error.cause` -#### Defined in - -node\_modules/typescript/lib/lib.es2022.error.d.ts:24 - *** ### message > **message**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077 + #### Inherited from `Error.message` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1077 - *** ### name > **name**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 + #### Inherited from `Error.name` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1076 - *** ### stack? > `optional` **stack**: `string` +Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078 + #### Inherited from `Error.stack` -#### Defined in - -node\_modules/typescript/lib/lib.es5.d.ts:1078 - *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` +Defined in: node\_modules/@types/node/globals.d.ts:162 + The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). @@ -126,15 +124,13 @@ not capture any frames. `Error.stackTraceLimit` -#### Defined in - -node\_modules/@types/node/globals.d.ts:162 - ## Methods ### captureStackTrace() -> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/@types/node/globals.d.ts:146 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which @@ -182,9 +178,13 @@ a(); #### Parameters -• **targetObject**: `object` +##### targetObject -• **constructorOpt?**: `Function` +`object` + +##### constructorOpt? + +`Function` #### Returns @@ -194,21 +194,23 @@ a(); `Error.captureStackTrace` -#### Defined in - -node\_modules/@types/node/globals.d.ts:146 - *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` +Defined in: node\_modules/@types/node/globals.d.ts:150 + #### Parameters -• **err**: `Error` +##### err -• **stackTraces**: `CallSite`[] +`Error` + +##### stackTraces + +`CallSite`[] #### Returns @@ -221,7 +223,3 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` - -#### Defined in - -node\_modules/@types/node/globals.d.ts:150 diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/base64ToU8.md b/docs/api/youtubei.js/namespaces/Utils/functions/base64ToU8.md new file mode 100644 index 00000000..1b80fcbc --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/base64ToU8.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / base64ToU8 + +# Function: base64ToU8() + +> **base64ToU8**(`base64`): `Uint8Array` + +Defined in: [src/utils/Utils.ts:250](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L250) + +## Parameters + +### base64 + +`string` + +## Returns + +`Uint8Array` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/concatMemos.md b/docs/api/youtubei.js/namespaces/Utils/functions/concatMemos.md new file mode 100644 index 00000000..ebde83c5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/concatMemos.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / concatMemos + +# Function: concatMemos() + +> **concatMemos**(...`iterables`): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/utils/Utils.ts:154](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L154) + +## Parameters + +### iterables + +...([`Memo`](../../Helpers/classes/Memo.md) \| `undefined`)[] + +## Returns + +[`Memo`](../../Helpers/classes/Memo.md) diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/deepCompare.md b/docs/api/youtubei.js/namespaces/Utils/functions/deepCompare.md new file mode 100644 index 00000000..c571014b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/deepCompare.md @@ -0,0 +1,24 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / deepCompare + +# Function: deepCompare() + +> **deepCompare**(`obj1`, `obj2`): `boolean` + +Defined in: [src/utils/Utils.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L67) + +Compares given objects. May not work correctly for +objects with methods. + +## Parameters + +### obj1 + +`any` + +### obj2 + +`any` + +## Returns + +`boolean` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/escapeStringRegexp.md b/docs/api/youtubei.js/namespaces/Utils/functions/escapeStringRegexp.md new file mode 100644 index 00000000..b4fc6c85 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/escapeStringRegexp.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / escapeStringRegexp + +# Function: escapeStringRegexp() + +> **escapeStringRegexp**(`input`): `string` + +Defined in: [src/utils/Utils.ts:90](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L90) + +## Parameters + +### input + +`string` + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/generateRandomString.md b/docs/api/youtubei.js/namespaces/Utils/functions/generateRandomString.md new file mode 100644 index 00000000..5b1848b4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/generateRandomString.md @@ -0,0 +1,19 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / generateRandomString + +# Function: generateRandomString() + +> **generateRandomString**(`length`): `string` + +Defined in: [src/utils/Utils.ts:124](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L124) + +Generates a random string with the given length. + +## Parameters + +### length + +`number` + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/generateSidAuth.md b/docs/api/youtubei.js/namespaces/Utils/functions/generateSidAuth.md new file mode 100644 index 00000000..eff57754 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/generateSidAuth.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / generateSidAuth + +# Function: generateSidAuth() + +> **generateSidAuth**(`sid`): `Promise`\<`string`\> + +Defined in: [src/utils/Utils.ts:110](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L110) + +Generates an authentication token from a cookies' sid. + +## Parameters + +### sid + +`string` + +Sid extracted from cookies + +## Returns + +`Promise`\<`string`\> diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/getCookie.md b/docs/api/youtubei.js/namespaces/Utils/functions/getCookie.md new file mode 100644 index 00000000..63dfd068 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/getCookie.md @@ -0,0 +1,25 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / getCookie + +# Function: getCookie() + +> **getCookie**(`cookies`, `name`, `matchWholeName`): `string` \| `undefined` + +Defined in: [src/utils/Utils.ts:260](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L260) + +## Parameters + +### cookies + +`string` + +### name + +`string` + +### matchWholeName + +`boolean` = `false` + +## Returns + +`string` \| `undefined` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/getRandomUserAgent.md b/docs/api/youtubei.js/namespaces/Utils/functions/getRandomUserAgent.md new file mode 100644 index 00000000..5f01869a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/getRandomUserAgent.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / getRandomUserAgent + +# Function: getRandomUserAgent() + +> **getRandomUserAgent**(`type`): `string` + +Defined in: [src/utils/Utils.ts:100](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L100) + +Returns a random user agent. + +## Parameters + +### type + +[`DeviceCategory`](../type-aliases/DeviceCategory.md) + +mobile | desktop + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/getStringBetweenStrings.md b/docs/api/youtubei.js/namespaces/Utils/functions/getStringBetweenStrings.md new file mode 100644 index 00000000..6f3106b8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/getStringBetweenStrings.md @@ -0,0 +1,33 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / getStringBetweenStrings + +# Function: getStringBetweenStrings() + +> **getStringBetweenStrings**(`data`, `start_string`, `end_string`): `string` \| `undefined` + +Defined in: [src/utils/Utils.ts:84](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L84) + +Finds a string between two delimiters. + +## Parameters + +### data + +`string` + +the data. + +### start\_string + +`string` + +start string. + +### end\_string + +`string` + +end string. + +## Returns + +`string` \| `undefined` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/hasKeys.md b/docs/api/youtubei.js/namespaces/Utils/functions/hasKeys.md new file mode 100644 index 00000000..68bc61f0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/hasKeys.md @@ -0,0 +1,31 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / hasKeys + +# Function: hasKeys() + +> **hasKeys**\<`T`, `R`\>(`params`, ...`keys`): `params is Exclude & Required>` + +Defined in: [src/utils/Utils.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L181) + +## Type Parameters + +### T + +`T` *extends* `object` + +### R + +`R` *extends* keyof `T`[] + +## Parameters + +### params + +`T` + +### keys + +...`R` + +## Returns + +`params is Exclude & Required>` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/isTextRun.md b/docs/api/youtubei.js/namespaces/Utils/functions/isTextRun.md new file mode 100644 index 00000000..83c10930 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/isTextRun.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / isTextRun + +# Function: isTextRun() + +> **isTextRun**(`run`): `run is TextRun` + +Defined in: [src/utils/Utils.ts:256](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L256) + +## Parameters + +### run + +[`TextRun`](../../Misc/classes/TextRun.md) | [`EmojiRun`](../../Misc/classes/EmojiRun.md) + +## Returns + +`run is TextRun` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/streamToIterable.md b/docs/api/youtubei.js/namespaces/Utils/functions/streamToIterable.md new file mode 100644 index 00000000..730133e6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/streamToIterable.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / streamToIterable + +# Function: streamToIterable() + +> **streamToIterable**(`stream`): `AsyncGenerator`\<`Uint8Array`, `void`, `unknown`\> + +Defined in: [src/utils/Utils.ts:189](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L189) + +## Parameters + +### stream + +`ReadableStream`\<`Uint8Array`\> + +## Returns + +`AsyncGenerator`\<`Uint8Array`, `void`, `unknown`\> diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/throwIfMissing.md b/docs/api/youtubei.js/namespaces/Utils/functions/throwIfMissing.md new file mode 100644 index 00000000..f0012544 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/throwIfMissing.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / throwIfMissing + +# Function: throwIfMissing() + +> **throwIfMissing**(`params`): `void` + +Defined in: [src/utils/Utils.ts:174](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L174) + +## Parameters + +### params + +`object` + +## Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/timeToSeconds.md b/docs/api/youtubei.js/namespaces/Utils/functions/timeToSeconds.md new file mode 100644 index 00000000..d8c3896e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/timeToSeconds.md @@ -0,0 +1,21 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / timeToSeconds + +# Function: timeToSeconds() + +> **timeToSeconds**(`time`): `number` + +Defined in: [src/utils/Utils.ts:140](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L140) + +Converts time (h:m:s) to seconds. + +## Parameters + +### time + +`string` + +## Returns + +`number` + +seconds diff --git a/docs/api/youtubei.js/namespaces/Utils/functions/u8ToBase64.md b/docs/api/youtubei.js/namespaces/Utils/functions/u8ToBase64.md new file mode 100644 index 00000000..0d76e650 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/functions/u8ToBase64.md @@ -0,0 +1,17 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / u8ToBase64 + +# Function: u8ToBase64() + +> **u8ToBase64**(`u8`): `string` + +Defined in: [src/utils/Utils.ts:246](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L246) + +## Parameters + +### u8 + +`Uint8Array` + +## Returns + +`string` diff --git a/docs/api/youtubei.js/namespaces/Utils/type-aliases/DeviceCategory.md b/docs/api/youtubei.js/namespaces/Utils/type-aliases/DeviceCategory.md new file mode 100644 index 00000000..55a51aa1 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/type-aliases/DeviceCategory.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / DeviceCategory + +# Type Alias: DeviceCategory + +> **DeviceCategory** = `"mobile"` \| `"desktop"` + +Defined in: [src/utils/Utils.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L94) diff --git a/docs/api/youtubei.js/namespaces/Utils/variables/debugFetch.md b/docs/api/youtubei.js/namespaces/Utils/variables/debugFetch.md new file mode 100644 index 00000000..1c7558ca --- /dev/null +++ b/docs/api/youtubei.js/namespaces/Utils/variables/debugFetch.md @@ -0,0 +1,7 @@ +[youtubei.js](../../../../README.md) / [Utils](../README.md) / debugFetch + +# Variable: debugFetch + +> `const` **debugFetch**: [`FetchFunction`](../../Types/type-aliases/FetchFunction.md) + +Defined in: [src/utils/Utils.ts:205](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/Utils.ts#L205) diff --git a/docs/api/namespaces/YT/README.md b/docs/api/youtubei.js/namespaces/YT/README.md similarity index 92% rename from docs/api/namespaces/YT/README.md rename to docs/api/youtubei.js/namespaces/YT/README.md index 74bab8ff..c9559380 100644 --- a/docs/api/namespaces/YT/README.md +++ b/docs/api/youtubei.js/namespaces/YT/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / YT +[youtubei.js](../../../README.md) / YT # YT -## Index - -### Classes +## Classes - [AccountInfo](classes/AccountInfo.md) - [Channel](classes/Channel.md) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/AccountInfo.md b/docs/api/youtubei.js/namespaces/YT/classes/AccountInfo.md new file mode 100644 index 00000000..1db53dc3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/AccountInfo.md @@ -0,0 +1,45 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / AccountInfo + +# Class: AccountInfo + +Defined in: [src/parser/youtube/AccountInfo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/AccountInfo.ts#L9) + +## Constructors + +### Constructor + +> **new AccountInfo**(`response`): `AccountInfo` + +Defined in: [src/parser/youtube/AccountInfo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/AccountInfo.ts#L14) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +#### Returns + +`AccountInfo` + +## Properties + +### contents + +> **contents**: [`AccountItemSection`](../../YTNodes/classes/AccountItemSection.md) \| `null` + +Defined in: [src/parser/youtube/AccountInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/AccountInfo.ts#L12) + +## Accessors + +### page + +#### Get Signature + +> **get** **page**(): [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +Defined in: [src/parser/youtube/AccountInfo.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/AccountInfo.ts#L28) + +##### Returns + +[`IParsedResponse`](../../../../interfaces/IParsedResponse.md) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/Channel.md b/docs/api/youtubei.js/namespaces/YT/classes/Channel.md new file mode 100644 index 00000000..a24b8d0c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/Channel.md @@ -0,0 +1,1038 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / Channel + +# Class: Channel + +Defined in: [src/parser/youtube/Channel.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L36) + +## Extends + +- [`TabbedFeed`](../../Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new Channel**(`actions`, `data`, `already_parsed`): `Channel` + +Defined in: [src/parser/youtube/Channel.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L42) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`Channel` + +#### Overrides + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`constructor`](../../Mixins/classes/TabbedFeed.md#constructor) + +## Properties + +### current\_tab? + +> `optional` **current\_tab**: [`Tab`](../../YTNodes/classes/Tab.md) \| [`ExpandableTab`](../../YTNodes/classes/ExpandableTab.md) + +Defined in: [src/parser/youtube/Channel.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L40) + +*** + +### header? + +> `optional` **header**: [`C4TabbedHeader`](../../YTNodes/classes/C4TabbedHeader.md) \| [`CarouselHeader`](../../YTNodes/classes/CarouselHeader.md) \| [`InteractiveTabbedHeader`](../../YTNodes/classes/InteractiveTabbedHeader.md) \| [`PageHeader`](../../YTNodes/classes/PageHeader.md) + +Defined in: [src/parser/youtube/Channel.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L37) + +*** + +### metadata + +> **metadata**: `object` + +Defined in: [src/parser/youtube/Channel.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L38) + +#### android\_appindexing\_link? + +> `optional` **android\_appindexing\_link**: `string` + +#### android\_deep\_link? + +> `optional` **android\_deep\_link**: `string` + +#### android\_package? + +> `optional` **android\_package**: `string` + +#### app\_name? + +> `optional` **app\_name**: `string` + +#### available\_countries? + +> `optional` **available\_countries**: `string`[] + +#### avatar? + +> `optional` **avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +#### description? + +> `optional` **description**: `string` + +#### external\_id? + +> `optional` **external\_id**: `string` + +#### ios\_app\_arguments? + +> `optional` **ios\_app\_arguments**: `string` + +#### ios\_app\_store\_id? + +> `optional` **ios\_app\_store\_id**: `string` + +#### ios\_appindexing\_link? + +> `optional` **ios\_appindexing\_link**: `string` + +#### is\_family\_safe? + +> `optional` **is\_family\_safe**: `boolean` + +#### is\_unlisted? + +> `optional` **is\_unlisted**: `boolean` + +#### keywords? + +> `optional` **keywords**: `string`[] + +#### music\_artist\_name? + +> `optional` **music\_artist\_name**: `string` + +#### noindex? + +> `optional` **noindex**: `string` + +#### og\_type? + +> `optional` **og\_type**: `string` + +#### rss\_url? + +> `optional` **rss\_url**: `string` + +#### schema\_dot\_org\_type? + +> `optional` **schema\_dot\_org\_type**: `string` + +#### site\_name? + +> `optional` **site\_name**: `string` + +#### tags? + +> `optional` **tags**: `string`[] + +#### thumbnail? + +> `optional` **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +#### title? + +> `optional` **title**: `string` + +#### twitter\_card\_type? + +> `optional` **twitter\_card\_type**: `string` + +#### twitter\_site\_handle? + +> `optional` **twitter\_site\_handle**: `string` + +#### type? + +> `readonly` `optional` **type**: `string` + +#### url? + +> `optional` **url**: `string` + +#### url\_applinks\_android? + +> `optional` **url\_applinks\_android**: `string` + +#### url\_applinks\_ios? + +> `optional` **url\_applinks\_ios**: `string` + +#### url\_applinks\_web? + +> `optional` **url\_applinks\_web**: `string` + +#### url\_canonical? + +> `optional` **url\_canonical**: `string` + +#### url\_twitter\_android? + +> `optional` **url\_twitter\_android**: `string` + +#### url\_twitter\_ios? + +> `optional` **url\_twitter\_ios**: `string` + +#### vanity\_channel\_url? + +> `optional` **vanity\_channel\_url**: `string` + +*** + +### subscribe\_button? + +> `optional` **subscribe\_button**: [`SubscribeButton`](../../YTNodes/classes/SubscribeButton.md) + +Defined in: [src/parser/youtube/Channel.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L39) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`actions`](../../Mixins/classes/TabbedFeed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`channels`](../../Mixins/classes/TabbedFeed.md#channels) + +*** + +### content\_type\_filters + +#### Get Signature + +> **get** **content\_type\_filters**(): `string`[] + +Defined in: [src/parser/youtube/Channel.ts:151](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L151) + +##### Returns + +`string`[] + +*** + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/parser/youtube/Channel.ts:142](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L142) + +##### Returns + +`string`[] + +*** + +### has\_about + +#### Get Signature + +> **get** **has\_about**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:289](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L289) + +##### Returns + +`boolean` + +*** + +### has\_community + +#### Get Signature + +> **get** **has\_community**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:285](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L285) + +##### Returns + +`boolean` + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`has_continuation`](../../Mixins/classes/TabbedFeed.md#has_continuation) + +*** + +### has\_courses + +#### Get Signature + +> **get** **has\_courses**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:277](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L277) + +##### Returns + +`boolean` + +*** + +### has\_home + +#### Get Signature + +> **get** **has\_home**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:253](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L253) + +##### Returns + +`boolean` + +*** + +### has\_live\_streams + +#### Get Signature + +> **get** **has\_live\_streams**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:265](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L265) + +##### Returns + +`boolean` + +*** + +### has\_playlists + +#### Get Signature + +> **get** **has\_playlists**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:281](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L281) + +##### Returns + +`boolean` + +*** + +### has\_podcasts + +#### Get Signature + +> **get** **has\_podcasts**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:273](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L273) + +##### Returns + +`boolean` + +*** + +### has\_releases + +#### Get Signature + +> **get** **has\_releases**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:269](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L269) + +##### Returns + +`boolean` + +*** + +### has\_search + +#### Get Signature + +> **get** **has\_search**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:296](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L296) + +##### Returns + +`boolean` + +*** + +### has\_shorts + +#### Get Signature + +> **get** **has\_shorts**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:261](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L261) + +##### Returns + +`boolean` + +*** + +### has\_videos + +#### Get Signature + +> **get** **has\_videos**(): `boolean` + +Defined in: [src/parser/youtube/Channel.ts:257](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L257) + +##### Returns + +`boolean` + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`memo`](../../Mixins/classes/TabbedFeed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`page`](../../Mixins/classes/TabbedFeed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`page_contents`](../../Mixins/classes/TabbedFeed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`playlists`](../../Mixins/classes/TabbedFeed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`posts`](../../Mixins/classes/TabbedFeed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`secondary_contents`](../../Mixins/classes/TabbedFeed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`shelves`](../../Mixins/classes/TabbedFeed.md#shelves) + +*** + +### sort\_filters + +#### Get Signature + +> **get** **sort\_filters**(): `string`[] + +Defined in: [src/parser/youtube/Channel.ts:146](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L146) + +##### Returns + +`string`[] + +*** + +### tabs + +#### Get Signature + +> **get** **tabs**(): `string`[] + +Defined in: [src/core/mixins/TabbedFeed.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L19) + +##### Returns + +`string`[] + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`tabs`](../../Mixins/classes/TabbedFeed.md#tabs) + +*** + +### title + +#### Get Signature + +> **get** **title**(): `string` \| `undefined` + +Defined in: [src/core/mixins/TabbedFeed.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L55) + +##### Returns + +`string` \| `undefined` + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`title`](../../Mixins/classes/TabbedFeed.md#title) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`videos`](../../Mixins/classes/TabbedFeed.md#videos) + +## Methods + +### applyContentTypeFilter() + +> **applyContentTypeFilter**(`content_type_filter`): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:123](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L123) + +Applies given content type filter to the list. Use [content\_type\_filters](#content_type_filters) to get available filters. + +#### Parameters + +##### content\_type\_filter + +`string` + +The content type filter to apply + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### applyFilter() + +> **applyFilter**(`filter`): `Promise`\<[`FilteredChannelList`](FilteredChannelList.md)\> + +Defined in: [src/parser/youtube/Channel.ts:72](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L72) + +Applies given filter to the list. Use [filters](#filters) to get available filters. + +#### Parameters + +##### filter + +The filter to apply + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<[`FilteredChannelList`](FilteredChannelList.md)\> + +*** + +### applySort() + +> **applySort**(`sort`): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:100](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L100) + +Applies given sort filter to the list. Use [sort\_filters](#sort_filters) to get available filters. + +#### Parameters + +##### sort + +`string` + +The sort filter to apply + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getAbout() + +> **getAbout**(): `Promise`\<[`ChannelAboutFullMetadata`](../../YTNodes/classes/ChannelAboutFullMetadata.md) \| [`AboutChannel`](../../YTNodes/classes/AboutChannel.md)\> + +Defined in: [src/parser/youtube/Channel.ts:205](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L205) + +Retrieves the about page. +Note that this does not return a new Channel object. + +#### Returns + +`Promise`\<[`ChannelAboutFullMetadata`](../../YTNodes/classes/ChannelAboutFullMetadata.md) \| [`AboutChannel`](../../YTNodes/classes/AboutChannel.md)\> + +*** + +### getCommunity() + +> **getCommunity**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:196](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L196) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<[`ChannelListContinuation`](ChannelListContinuation.md)\> + +Defined in: [src/parser/youtube/Channel.ts:300](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L300) + +Retrieves next batch of contents and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Returns + +`Promise`\<[`ChannelListContinuation`](ChannelListContinuation.md)\> + +#### Overrides + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`getContinuation`](../../Mixins/classes/TabbedFeed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`getContinuationData`](../../Mixins/classes/TabbedFeed.md#getcontinuationdata) + +*** + +### getCourses() + +> **getCourses**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:186](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L186) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getHome() + +> **getHome**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:156](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L156) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getLiveStreams() + +> **getLiveStreams**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:171](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L171) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getPlaylists() + +> **getPlaylists**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:191](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L191) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getPodcasts() + +> **getPodcasts**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L181) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getReleases() + +> **getReleases**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:176](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L176) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`getShelf`](../../Mixins/classes/TabbedFeed.md#getshelf) + +*** + +### getShorts() + +> **getShorts**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:166](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L166) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getTabByName() + +> **getTabByName**(`title`): `Promise`\<[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +Defined in: [src/core/mixins/TabbedFeed.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L23) + +#### Parameters + +##### title + +`string` + +#### Returns + +`Promise`\<[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`getTabByName`](../../Mixins/classes/TabbedFeed.md#gettabbyname) + +*** + +### getTabByURL() + +> **getTabByURL**(`url`): `Promise`\<[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +Defined in: [src/core/mixins/TabbedFeed.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L37) + +#### Parameters + +##### url + +`string` + +#### Returns + +`Promise`\<[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`getTabByURL`](../../Mixins/classes/TabbedFeed.md#gettabbyurl) + +*** + +### getVideos() + +> **getVideos**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:161](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L161) + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### hasTabWithURL() + +> **hasTabWithURL**(`url`): `boolean` + +Defined in: [src/core/mixins/TabbedFeed.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/TabbedFeed.ts#L51) + +#### Parameters + +##### url + +`string` + +#### Returns + +`boolean` + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`hasTabWithURL`](../../Mixins/classes/TabbedFeed.md#hastabwithurl) + +*** + +### search() + +> **search**(`query`): `Promise`\<`Channel`\> + +Defined in: [src/parser/youtube/Channel.ts:242](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L242) + +Searches within the channel. + +#### Parameters + +##### query + +`string` + +#### Returns + +`Promise`\<`Channel`\> + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/TabbedFeed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`TabbedFeed`](../../Mixins/classes/TabbedFeed.md).[`getVideosFromMemo`](../../Mixins/classes/TabbedFeed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/ChannelListContinuation.md b/docs/api/youtubei.js/namespaces/YT/classes/ChannelListContinuation.md new file mode 100644 index 00000000..8cc8bdd7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/ChannelListContinuation.md @@ -0,0 +1,371 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / ChannelListContinuation + +# Class: ChannelListContinuation + +Defined in: [src/parser/youtube/Channel.ts:308](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L308) + +## Extends + +- [`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new ChannelListContinuation**(`actions`, `data`, `already_parsed`): `ChannelListContinuation` + +Defined in: [src/parser/youtube/Channel.ts:311](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L311) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`ChannelListContinuation` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`constructor`](../../Mixins/classes/Feed.md#constructor) + +## Properties + +### contents? + +> `optional` **contents**: [`OpenPopupAction`](../../YTNodes/classes/OpenPopupAction.md) \| [`AppendContinuationItemsAction`](../../../../classes/AppendContinuationItemsAction.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) \| [`NavigateAction`](../../../../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../../../../classes/ShowMiniplayerCommand.md) + +Defined in: [src/parser/youtube/Channel.ts:309](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L309) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`actions`](../../Mixins/classes/Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`channels`](../../Mixins/classes/Feed.md#channels) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`has_continuation`](../../Mixins/classes/Feed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`memo`](../../Mixins/classes/Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page`](../../Mixins/classes/Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page_contents`](../../Mixins/classes/Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`playlists`](../../Mixins/classes/Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`posts`](../../Mixins/classes/Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`secondary_contents`](../../Mixins/classes/Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`shelves`](../../Mixins/classes/Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`videos`](../../Mixins/classes/Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`ChannelListContinuation`\> + +Defined in: [src/parser/youtube/Channel.ts:318](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L318) + +Retrieves next batch of contents and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Returns + +`Promise`\<`ChannelListContinuation`\> + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuation`](../../Mixins/classes/Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuationData`](../../Mixins/classes/Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getShelf`](../../Mixins/classes/Feed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getVideosFromMemo`](../../Mixins/classes/Feed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/Comments.md b/docs/api/youtubei.js/namespaces/YT/classes/Comments.md new file mode 100644 index 00000000..754add25 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/Comments.md @@ -0,0 +1,133 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / Comments + +# Class: Comments + +Defined in: [src/parser/youtube/Comments.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L15) + +## Constructors + +### Constructor + +> **new Comments**(`actions`, `data`, `already_parsed`): `Comments` + +Defined in: [src/parser/youtube/Comments.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L23) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +`any` + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`Comments` + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CommentThread`](../../YTNodes/classes/CommentThread.md)\> + +Defined in: [src/parser/youtube/Comments.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L21) + +*** + +### header? + +> `optional` **header**: [`CommentsHeader`](../../YTNodes/classes/CommentsHeader.md) + +Defined in: [src/parser/youtube/Comments.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L20) + +## Accessors + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/youtube/Comments.ts:117](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L117) + +##### Returns + +`boolean` + +*** + +### page + +#### Get Signature + +> **get** **page**(): [`INextResponse`](../../../../type-aliases/INextResponse.md) + +Defined in: [src/parser/youtube/Comments.ts:121](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L121) + +##### Returns + +[`INextResponse`](../../../../type-aliases/INextResponse.md) + +## Methods + +### applySort() + +> **applySort**(`sort`): `Promise`\<`Comments`\> + +Defined in: [src/parser/youtube/Comments.ts:53](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L53) + +Applies given sort option to the comments. + +#### Parameters + +##### sort + +Sort type. + +`"TOP_COMMENTS"` | `"NEWEST_FIRST"` + +#### Returns + +`Promise`\<`Comments`\> + +*** + +### createComment() + +> **createComment**(`text`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/youtube/Comments.ts:80](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L80) + +Creates a top-level comment. + +#### Parameters + +##### text + +`string` + +Comment text. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<`Comments`\> + +Defined in: [src/parser/youtube/Comments.ts:98](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Comments.ts#L98) + +Retrieves next batch of comments. + +#### Returns + +`Promise`\<`Comments`\> diff --git a/docs/api/youtubei.js/namespaces/YT/classes/FilteredChannelList.md b/docs/api/youtubei.js/namespaces/YT/classes/FilteredChannelList.md new file mode 100644 index 00000000..73a902cc --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/FilteredChannelList.md @@ -0,0 +1,465 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / FilteredChannelList + +# Class: FilteredChannelList + +Defined in: [src/parser/youtube/Channel.ts:326](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L326) + +## Extends + +- [`FilterableFeed`](../../Mixins/classes/FilterableFeed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new FilteredChannelList**(`actions`, `data`, `already_parsed`): `FilteredChannelList` + +Defined in: [src/parser/youtube/Channel.ts:330](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L330) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`FilteredChannelList` + +#### Overrides + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`constructor`](../../Mixins/classes/FilterableFeed.md#constructor) + +## Properties + +### applied\_filter? + +> `optional` **applied\_filter**: [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +Defined in: [src/parser/youtube/Channel.ts:327](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L327) + +*** + +### contents? + +> `optional` **contents**: [`OpenPopupAction`](../../YTNodes/classes/OpenPopupAction.md) \| [`AppendContinuationItemsAction`](../../../../classes/AppendContinuationItemsAction.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) \| [`NavigateAction`](../../../../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../../../../classes/ShowMiniplayerCommand.md) + +Defined in: [src/parser/youtube/Channel.ts:328](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L328) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`actions`](../../Mixins/classes/FilterableFeed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`channels`](../../Mixins/classes/FilterableFeed.md#channels) + +*** + +### filter\_chips + +#### Get Signature + +> **get** **filter\_chips**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md)\> + +Defined in: [src/core/mixins/FilterableFeed.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L20) + +Returns the filter chips. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`filter_chips`](../../Mixins/classes/FilterableFeed.md#filter_chips) + +*** + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/core/mixins/FilterableFeed.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L38) + +Returns available filters. + +##### Returns + +`string`[] + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`filters`](../../Mixins/classes/FilterableFeed.md#filters) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`has_continuation`](../../Mixins/classes/FilterableFeed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`memo`](../../Mixins/classes/FilterableFeed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`page`](../../Mixins/classes/FilterableFeed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`page_contents`](../../Mixins/classes/FilterableFeed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`playlists`](../../Mixins/classes/FilterableFeed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`posts`](../../Mixins/classes/FilterableFeed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`secondary_contents`](../../Mixins/classes/FilterableFeed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`shelves`](../../Mixins/classes/FilterableFeed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`videos`](../../Mixins/classes/FilterableFeed.md#videos) + +## Methods + +### applyFilter() + +> **applyFilter**(`filter`): `Promise`\<`FilteredChannelList`\> + +Defined in: [src/parser/youtube/Channel.ts:350](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L350) + +Applies given filter to the list. + +#### Parameters + +##### filter + +The filter to apply + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<`FilteredChannelList`\> + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<`FilteredChannelList`\> + +Defined in: [src/parser/youtube/Channel.ts:355](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Channel.ts#L355) + +Retrieves next batch of contents and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Returns + +`Promise`\<`FilteredChannelList`\> + +#### Overrides + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getContinuation`](../../Mixins/classes/FilterableFeed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getContinuationData`](../../Mixins/classes/FilterableFeed.md#getcontinuationdata) + +*** + +### getFilteredFeed() + +> **getFilteredFeed**(`filter`): `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +Defined in: [src/core/mixins/FilterableFeed.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L45) + +Applies given filter and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Parameters + +##### filter + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getFilteredFeed`](../../Mixins/classes/FilterableFeed.md#getfilteredfeed) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getShelf`](../../Mixins/classes/FilterableFeed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/FilterableFeed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getVideosFromMemo`](../../Mixins/classes/FilterableFeed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/Guide.md b/docs/api/youtubei.js/namespaces/YT/classes/Guide.md new file mode 100644 index 00000000..27a1bf51 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/Guide.md @@ -0,0 +1,45 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / Guide + +# Class: Guide + +Defined in: [src/parser/youtube/Guide.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Guide.ts#L9) + +## Constructors + +### Constructor + +> **new Guide**(`data`): `Guide` + +Defined in: [src/parser/youtube/Guide.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Guide.ts#L13) + +#### Parameters + +##### data + +[`IRawResponse`](../../../../interfaces/IRawResponse.md) + +#### Returns + +`Guide` + +## Properties + +### contents? + +> `optional` **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GuideSection`](../../YTNodes/classes/GuideSection.md) \| [`GuideSubscriptionsSection`](../../YTNodes/classes/GuideSubscriptionsSection.md)\> + +Defined in: [src/parser/youtube/Guide.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Guide.ts#L11) + +## Accessors + +### page + +#### Get Signature + +> **get** **page**(): [`IGuideResponse`](../../../../type-aliases/IGuideResponse.md) + +Defined in: [src/parser/youtube/Guide.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Guide.ts#L19) + +##### Returns + +[`IGuideResponse`](../../../../type-aliases/IGuideResponse.md) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/HashtagFeed.md b/docs/api/youtubei.js/namespaces/YT/classes/HashtagFeed.md new file mode 100644 index 00000000..87cde9a9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/HashtagFeed.md @@ -0,0 +1,461 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / HashtagFeed + +# Class: HashtagFeed + +Defined in: [src/parser/youtube/HashtagFeed.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HashtagFeed.ts#L12) + +## Extends + +- [`FilterableFeed`](../../Mixins/classes/FilterableFeed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new HashtagFeed**(`actions`, `response`): `HashtagFeed` + +Defined in: [src/parser/youtube/HashtagFeed.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HashtagFeed.ts#L16) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +#### Returns + +`HashtagFeed` + +#### Overrides + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`constructor`](../../Mixins/classes/FilterableFeed.md#constructor) + +## Properties + +### contents + +> **contents**: [`RichGrid`](../../YTNodes/classes/RichGrid.md) + +Defined in: [src/parser/youtube/HashtagFeed.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HashtagFeed.ts#L14) + +*** + +### header? + +> `optional` **header**: [`PageHeader`](../../YTNodes/classes/PageHeader.md) \| [`HashtagHeader`](../../YTNodes/classes/HashtagHeader.md) + +Defined in: [src/parser/youtube/HashtagFeed.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HashtagFeed.ts#L13) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`actions`](../../Mixins/classes/FilterableFeed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`channels`](../../Mixins/classes/FilterableFeed.md#channels) + +*** + +### filter\_chips + +#### Get Signature + +> **get** **filter\_chips**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md)\> + +Defined in: [src/core/mixins/FilterableFeed.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L20) + +Returns the filter chips. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`filter_chips`](../../Mixins/classes/FilterableFeed.md#filter_chips) + +*** + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/core/mixins/FilterableFeed.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L38) + +Returns available filters. + +##### Returns + +`string`[] + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`filters`](../../Mixins/classes/FilterableFeed.md#filters) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`has_continuation`](../../Mixins/classes/FilterableFeed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`memo`](../../Mixins/classes/FilterableFeed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`page`](../../Mixins/classes/FilterableFeed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`page_contents`](../../Mixins/classes/FilterableFeed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`playlists`](../../Mixins/classes/FilterableFeed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`posts`](../../Mixins/classes/FilterableFeed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`secondary_contents`](../../Mixins/classes/FilterableFeed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`shelves`](../../Mixins/classes/FilterableFeed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`videos`](../../Mixins/classes/FilterableFeed.md#videos) + +## Methods + +### applyFilter() + +> **applyFilter**(`filter`): `Promise`\<`HashtagFeed`\> + +Defined in: [src/parser/youtube/HashtagFeed.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HashtagFeed.ts#L38) + +Applies given filter and returns a new HashtagFeed object. Use [HashtagFeed.filters](#filters) to get available filters. + +#### Parameters + +##### filter + +Filter to apply. + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<`HashtagFeed`\> + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +Defined in: [src/core/mixins/Feed.ts:219](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L219) + +Retrieves next batch of contents and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Returns + +`Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getContinuation`](../../Mixins/classes/FilterableFeed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getContinuationData`](../../Mixins/classes/FilterableFeed.md#getcontinuationdata) + +*** + +### getFilteredFeed() + +> **getFilteredFeed**(`filter`): `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +Defined in: [src/core/mixins/FilterableFeed.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L45) + +Applies given filter and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Parameters + +##### filter + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getFilteredFeed`](../../Mixins/classes/FilterableFeed.md#getfilteredfeed) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getShelf`](../../Mixins/classes/FilterableFeed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/FilterableFeed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getVideosFromMemo`](../../Mixins/classes/FilterableFeed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/History.md b/docs/api/youtubei.js/namespaces/YT/classes/History.md new file mode 100644 index 00000000..67381e8c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/History.md @@ -0,0 +1,403 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / History + +# Class: History + +Defined in: [src/parser/youtube/History.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/History.ts#L11) + +## Extends + +- [`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new History**(`actions`, `data`, `already_parsed`): `History` + +Defined in: [src/parser/youtube/History.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/History.ts#L15) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`History` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`constructor`](../../Mixins/classes/Feed.md#constructor) + +## Properties + +### feed\_actions + +> **feed\_actions**: [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) + +Defined in: [src/parser/youtube/History.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/History.ts#L13) + +*** + +### sections + +> **sections**: [`ItemSection`](../../YTNodes/classes/ItemSection.md)[] + +Defined in: [src/parser/youtube/History.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/History.ts#L12) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`actions`](../../Mixins/classes/Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`channels`](../../Mixins/classes/Feed.md#channels) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`has_continuation`](../../Mixins/classes/Feed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`memo`](../../Mixins/classes/Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page`](../../Mixins/classes/Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page_contents`](../../Mixins/classes/Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`playlists`](../../Mixins/classes/Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`posts`](../../Mixins/classes/Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`secondary_contents`](../../Mixins/classes/Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`shelves`](../../Mixins/classes/Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`videos`](../../Mixins/classes/Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`History`\> + +Defined in: [src/parser/youtube/History.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/History.ts#L24) + +Retrieves next batch of contents. + +#### Returns + +`Promise`\<`History`\> + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuation`](../../Mixins/classes/Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuationData`](../../Mixins/classes/Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getShelf`](../../Mixins/classes/Feed.md#getshelf) + +*** + +### removeVideo() + +> **removeVideo**(`video_id`, `pages_to_load`): `Promise`\<`boolean`\> + +Defined in: [src/parser/youtube/History.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/History.ts#L34) + +Removes a video from watch history. + +#### Parameters + +##### video\_id + +`string` + +##### pages\_to\_load + +`number` = `1` + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getVideosFromMemo`](../../Mixins/classes/Feed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/HomeFeed.md b/docs/api/youtubei.js/namespaces/YT/classes/HomeFeed.md new file mode 100644 index 00000000..8cb0997a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/HomeFeed.md @@ -0,0 +1,465 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / HomeFeed + +# Class: HomeFeed + +Defined in: [src/parser/youtube/HomeFeed.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HomeFeed.ts#L10) + +## Extends + +- [`FilterableFeed`](../../Mixins/classes/FilterableFeed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new HomeFeed**(`actions`, `data`, `already_parsed`): `HomeFeed` + +Defined in: [src/parser/youtube/HomeFeed.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HomeFeed.ts#L14) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`HomeFeed` + +#### Overrides + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`constructor`](../../Mixins/classes/FilterableFeed.md#constructor) + +## Properties + +### contents? + +> `optional` **contents**: [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`AppendContinuationItemsAction`](../../../../classes/AppendContinuationItemsAction.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/parser/youtube/HomeFeed.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HomeFeed.ts#L11) + +*** + +### header? + +> `optional` **header**: [`FeedTabbedHeader`](../../YTNodes/classes/FeedTabbedHeader.md) + +Defined in: [src/parser/youtube/HomeFeed.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HomeFeed.ts#L12) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`actions`](../../Mixins/classes/FilterableFeed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`channels`](../../Mixins/classes/FilterableFeed.md#channels) + +*** + +### filter\_chips + +#### Get Signature + +> **get** **filter\_chips**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md)\> + +Defined in: [src/core/mixins/FilterableFeed.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L20) + +Returns the filter chips. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`filter_chips`](../../Mixins/classes/FilterableFeed.md#filter_chips) + +*** + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/core/mixins/FilterableFeed.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L38) + +Returns available filters. + +##### Returns + +`string`[] + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`filters`](../../Mixins/classes/FilterableFeed.md#filters) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`has_continuation`](../../Mixins/classes/FilterableFeed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`memo`](../../Mixins/classes/FilterableFeed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`page`](../../Mixins/classes/FilterableFeed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`page_contents`](../../Mixins/classes/FilterableFeed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`playlists`](../../Mixins/classes/FilterableFeed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`posts`](../../Mixins/classes/FilterableFeed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`secondary_contents`](../../Mixins/classes/FilterableFeed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`shelves`](../../Mixins/classes/FilterableFeed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`videos`](../../Mixins/classes/FilterableFeed.md#videos) + +## Methods + +### applyFilter() + +> **applyFilter**(`filter`): `Promise`\<`HomeFeed`\> + +Defined in: [src/parser/youtube/HomeFeed.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HomeFeed.ts#L24) + +Applies given filter to the feed. Use [filters](HashtagFeed.md#filters) to get available filters. + +#### Parameters + +##### filter + +Filter to apply. + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<`HomeFeed`\> + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<`HomeFeed`\> + +Defined in: [src/parser/youtube/HomeFeed.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/HomeFeed.ts#L32) + +Retrieves next batch of contents. + +#### Returns + +`Promise`\<`HomeFeed`\> + +#### Overrides + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getContinuation`](../../Mixins/classes/FilterableFeed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getContinuationData`](../../Mixins/classes/FilterableFeed.md#getcontinuationdata) + +*** + +### getFilteredFeed() + +> **getFilteredFeed**(`filter`): `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +Defined in: [src/core/mixins/FilterableFeed.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/FilterableFeed.ts#L45) + +Applies given filter and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Parameters + +##### filter + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getFilteredFeed`](../../Mixins/classes/FilterableFeed.md#getfilteredfeed) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getShelf`](../../Mixins/classes/FilterableFeed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/FilterableFeed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`FilterableFeed`](../../Mixins/classes/FilterableFeed.md).[`getVideosFromMemo`](../../Mixins/classes/FilterableFeed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/ItemMenu.md b/docs/api/youtubei.js/namespaces/YT/classes/ItemMenu.md new file mode 100644 index 00000000..694dfce5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/ItemMenu.md @@ -0,0 +1,87 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / ItemMenu + +# Class: ItemMenu + +Defined in: [src/parser/youtube/ItemMenu.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/ItemMenu.ts#L11) + +## Constructors + +### Constructor + +> **new ItemMenu**(`data`, `actions`): `ItemMenu` + +Defined in: [src/parser/youtube/ItemMenu.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/ItemMenu.ts#L16) + +#### Parameters + +##### data + +[`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`ItemMenu` + +## Methods + +### items() + +> **items**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/youtube/ItemMenu.ts:59](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/ItemMenu.ts#L59) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +*** + +### page() + +> **page**(): [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +Defined in: [src/parser/youtube/ItemMenu.ts:63](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/ItemMenu.ts#L63) + +#### Returns + +[`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +*** + +### selectItem() + +#### Call Signature + +> **selectItem**(`icon_type`): `Promise`\<[`IParsedResponse`](../../../../interfaces/IParsedResponse.md)\> + +Defined in: [src/parser/youtube/ItemMenu.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/ItemMenu.ts#L28) + +##### Parameters + +###### icon\_type + +`string` + +##### Returns + +`Promise`\<[`IParsedResponse`](../../../../interfaces/IParsedResponse.md)\> + +#### Call Signature + +> **selectItem**(`button`): `Promise`\<[`IParsedResponse`](../../../../interfaces/IParsedResponse.md)\> + +Defined in: [src/parser/youtube/ItemMenu.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/ItemMenu.ts#L29) + +##### Parameters + +###### button + +[`Button`](../../YTNodes/classes/Button.md) + +##### Returns + +`Promise`\<[`IParsedResponse`](../../../../interfaces/IParsedResponse.md)\> diff --git a/docs/api/youtubei.js/namespaces/YT/classes/Library.md b/docs/api/youtubei.js/namespaces/YT/classes/Library.md new file mode 100644 index 00000000..7f11ae14 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/Library.md @@ -0,0 +1,465 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / Library + +# Class: Library + +Defined in: [src/parser/youtube/Library.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L13) + +## Extends + +- [`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new Library**(`actions`, `data`): `Library` + +Defined in: [src/parser/youtube/Library.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L17) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +#### Returns + +`Library` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`constructor`](../../Mixins/classes/Feed.md#constructor) + +## Properties + +### header + +> **header**: [`PageHeader`](../../YTNodes/classes/PageHeader.md) \| `null` + +Defined in: [src/parser/youtube/Library.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L14) + +*** + +### sections + +> **sections**: `object`[] + +Defined in: [src/parser/youtube/Library.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L15) + +#### contents + +> **contents**: `any`[] + +#### getAll() + +> **getAll**: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\> + +##### Returns + +`Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\> + +#### title + +> **title**: [`Text`](../../Misc/classes/Text.md) = `shelf.title` + +#### type + +> **type**: `string` \| `undefined` = `shelf.icon_type` + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`actions`](../../Mixins/classes/Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`channels`](../../Mixins/classes/Feed.md#channels) + +*** + +### clips + +#### Get Signature + +> **get** **clips**(): \{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +Defined in: [src/parser/youtube/Library.ts:76](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L76) + +##### Returns + +\{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`has_continuation`](../../Mixins/classes/Feed.md#has_continuation) + +*** + +### history + +#### Get Signature + +> **get** **history**(): \{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +Defined in: [src/parser/youtube/Library.ts:60](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L60) + +##### Returns + +\{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +*** + +### liked\_videos + +#### Get Signature + +> **get** **liked\_videos**(): \{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +Defined in: [src/parser/youtube/Library.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L68) + +##### Returns + +\{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`memo`](../../Mixins/classes/Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page`](../../Mixins/classes/Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page_contents`](../../Mixins/classes/Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`playlists`](../../Mixins/classes/Feed.md#playlists) + +*** + +### playlists\_section + +#### Get Signature + +> **get** **playlists\_section**(): \{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +Defined in: [src/parser/youtube/Library.ts:72](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L72) + +##### Returns + +\{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`posts`](../../Mixins/classes/Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`secondary_contents`](../../Mixins/classes/Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`shelves`](../../Mixins/classes/Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`videos`](../../Mixins/classes/Feed.md#videos) + +*** + +### watch\_later + +#### Get Signature + +> **get** **watch\_later**(): \{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +Defined in: [src/parser/youtube/Library.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Library.ts#L64) + +##### Returns + +\{ `contents`: `any`[]; `getAll`: () => `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> \| [`History`](History.md) \| [`Playlist`](Playlist.md)\>; `title`: [`Text`](../../Misc/classes/Text.md); `type`: `string` \| `undefined`; \} \| `undefined` + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +Defined in: [src/core/mixins/Feed.ts:219](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L219) + +Retrieves next batch of contents and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Returns + +`Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuation`](../../Mixins/classes/Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuationData`](../../Mixins/classes/Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getShelf`](../../Mixins/classes/Feed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getVideosFromMemo`](../../Mixins/classes/Feed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/LiveChat.md b/docs/api/youtubei.js/namespaces/YT/classes/LiveChat.md new file mode 100644 index 00000000..c7faa4d8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/LiveChat.md @@ -0,0 +1,585 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / LiveChat + +# Class: LiveChat + +Defined in: [src/parser/youtube/LiveChat.ts:58](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L58) + +## Extends + +- [`EventEmitter`](../../../../classes/EventEmitter.md) + +## Constructors + +### Constructor + +> **new LiveChat**(`video_info`): `LiveChat` + +Defined in: [src/parser/youtube/LiveChat.ts:73](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L73) + +#### Parameters + +##### video\_info + +[`VideoInfo`](VideoInfo.md) + +#### Returns + +`LiveChat` + +#### Overrides + +[`EventEmitter`](../../../../classes/EventEmitter.md).[`constructor`](../../../../classes/EventEmitter.md#constructor) + +## Properties + +### initial\_info? + +> `optional` **initial\_info**: [`LiveChatContinuation`](../../../../classes/LiveChatContinuation.md) + +Defined in: [src/parser/youtube/LiveChat.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L68) + +*** + +### is\_replay + +> **is\_replay**: `boolean` = `false` + +Defined in: [src/parser/youtube/LiveChat.ts:71](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L71) + +*** + +### metadata? + +> `optional` **metadata**: `LiveMetadata` + +Defined in: [src/parser/youtube/LiveChat.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L69) + +*** + +### running + +> **running**: `boolean` = `false` + +Defined in: [src/parser/youtube/LiveChat.ts:70](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L70) + +*** + +### smoothed\_queue + +> **smoothed\_queue**: [`SmoothedQueue`](SmoothedQueue.md) + +Defined in: [src/parser/youtube/LiveChat.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L67) + +## Methods + +### addEventListener() + +> **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. + +The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + +When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + +When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + +When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + +If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + +The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture. + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener) + +#### Parameters + +##### type + +`string` + +##### callback + +`EventListenerOrEventListenerObject` | `null` + +##### options? + +`boolean` | `AddEventListenerOptions` + +#### Returns + +`void` + +#### Inherited from + +[`EventEmitter`](../../../../classes/EventEmitter.md).[`addEventListener`](../../../../classes/EventEmitter.md#addeventlistener) + +*** + +### applyFilter() + +> **applyFilter**(`filter`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:287](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L287) + +Applies given filter to the live chat. + +#### Parameters + +##### filter + +Filter to apply. + +`"TOP_CHAT"` | `"LIVE_CHAT"` + +#### Returns + +`void` + +*** + +### 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` + +#### Returns + +`boolean` + +#### Inherited from + +[`EventEmitter`](../../../../classes/EventEmitter.md).[`dispatchEvent`](../../../../classes/EventEmitter.md#dispatchevent) + +*** + +### emit() + +> **emit**(`type`, ...`args`): `void` + +Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L10) + +#### Parameters + +##### type + +`string` + +##### args + +...`any`[] + +#### Returns + +`void` + +#### Inherited from + +[`EventEmitter`](../../../../classes/EventEmitter.md).[`emit`](../../../../classes/EventEmitter.md#emit) + +*** + +### getItemMenu() + +> **getItemMenu**(`item`): `Promise`\<[`ItemMenu`](ItemMenu.md)\> + +Defined in: [src/parser/youtube/LiveChat.ts:305](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L305) + +Retrieves given chat item's menu. + +#### Parameters + +##### item + +`ChatItemWithMenu` + +#### Returns + +`Promise`\<[`ItemMenu`](ItemMenu.md)\> + +*** + +### off() + +> **off**(`type`, `listener`): `void` + +Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/EventEmitterLike.ts#L40) + +#### Parameters + +##### type + +`string` + +##### listener + +(...`args`) => `void` + +#### Returns + +`void` + +#### Inherited from + +[`EventEmitter`](../../../../classes/EventEmitter.md).[`off`](../../../../classes/EventEmitter.md#off) + +*** + +### on() + +#### Call Signature + +> **on**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:108](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L108) + +##### Parameters + +###### type + +`"start"` + +###### listener + +(`initial_data`) => `void` + +##### Returns + +`void` + +##### Overrides + +[`EventEmitter`](../../../../classes/EventEmitter.md).[`on`](../../../../classes/EventEmitter.md#on) + +#### Call Signature + +> **on**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:109](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L109) + +##### Parameters + +###### type + +`"chat-update"` + +###### listener + +(`action`) => `void` + +##### Returns + +`void` + +##### Overrides + +`EventEmitter.on` + +#### Call Signature + +> **on**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:110](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L110) + +##### Parameters + +###### type + +`"metadata-update"` + +###### listener + +(`metadata`) => `void` + +##### Returns + +`void` + +##### Overrides + +`EventEmitter.on` + +#### Call Signature + +> **on**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:111](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L111) + +##### Parameters + +###### type + +`"error"` + +###### listener + +(`err`) => `void` + +##### Returns + +`void` + +##### Overrides + +`EventEmitter.on` + +#### Call Signature + +> **on**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L112) + +##### Parameters + +###### type + +`"end"` + +###### listener + +() => `void` + +##### Returns + +`void` + +##### Overrides + +`EventEmitter.on` + +*** + +### once() + +#### Call Signature + +> **once**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:117](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L117) + +##### Parameters + +###### type + +`"start"` + +###### listener + +(`initial_data`) => `void` + +##### Returns + +`void` + +##### Overrides + +[`EventEmitter`](../../../../classes/EventEmitter.md).[`once`](../../../../classes/EventEmitter.md#once) + +#### Call Signature + +> **once**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:118](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L118) + +##### Parameters + +###### type + +`"chat-update"` + +###### listener + +(`action`) => `void` + +##### Returns + +`void` + +##### Overrides + +`EventEmitter.once` + +#### Call Signature + +> **once**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L119) + +##### Parameters + +###### type + +`"metadata-update"` + +###### listener + +(`metadata`) => `void` + +##### Returns + +`void` + +##### Overrides + +`EventEmitter.once` + +#### Call Signature + +> **once**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:120](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L120) + +##### Parameters + +###### type + +`"error"` + +###### listener + +(`err`) => `void` + +##### Returns + +`void` + +##### Overrides + +`EventEmitter.once` + +#### Call Signature + +> **once**(`type`, `listener`): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:121](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L121) + +##### Parameters + +###### type + +`"end"` + +###### listener + +() => `void` + +##### Returns + +`void` + +##### Overrides + +`EventEmitter.once` + +*** + +### removeEventListener() + +> **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. + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener) + +#### Parameters + +##### type + +`string` + +##### callback + +`EventListenerOrEventListenerObject` | `null` + +##### options? + +`boolean` | `EventListenerOptions` + +#### Returns + +`void` + +#### Inherited from + +[`EventEmitter`](../../../../classes/EventEmitter.md).[`removeEventListener`](../../../../classes/EventEmitter.md#removeeventlistener) + +*** + +### selectButton() + +> **selectButton**(`button`): `Promise`\<[`IParsedResponse`](../../../../interfaces/IParsedResponse.md)\> + +Defined in: [src/parser/youtube/LiveChat.ts:320](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L320) + +Equivalent to "clicking" a button. + +#### Parameters + +##### button + +[`Button`](../../YTNodes/classes/Button.md) + +#### Returns + +`Promise`\<[`IParsedResponse`](../../../../interfaces/IParsedResponse.md)\> + +*** + +### sendMessage() + +> **sendMessage**(`text`): `Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`RunAttestationCommand`](../../YTNodes/classes/RunAttestationCommand.md) \| [`AddChatItemAction`](../../YTNodes/classes/AddChatItemAction.md)\>\> + +Defined in: [src/parser/youtube/LiveChat.ts:255](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L255) + +Sends a message. + +#### Parameters + +##### text + +`string` + +Text to send. + +#### Returns + +`Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`RunAttestationCommand`](../../YTNodes/classes/RunAttestationCommand.md) \| [`AddChatItemAction`](../../YTNodes/classes/AddChatItemAction.md)\>\> + +*** + +### start() + +> **start**(): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L126) + +#### Returns + +`void` + +*** + +### stop() + +> **stop**(): `void` + +Defined in: [src/parser/youtube/LiveChat.ts:134](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/LiveChat.ts#L134) + +#### Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/YT/classes/NotificationsMenu.md b/docs/api/youtubei.js/namespaces/YT/classes/NotificationsMenu.md new file mode 100644 index 00000000..c937fbc6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/NotificationsMenu.md @@ -0,0 +1,69 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / NotificationsMenu + +# Class: NotificationsMenu + +Defined in: [src/parser/youtube/NotificationsMenu.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/NotificationsMenu.ts#L11) + +## Constructors + +### Constructor + +> **new NotificationsMenu**(`actions`, `response`): `NotificationsMenu` + +Defined in: [src/parser/youtube/NotificationsMenu.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/NotificationsMenu.ts#L18) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +#### Returns + +`NotificationsMenu` + +## Properties + +### contents + +> **contents**: [`Notification`](../../YTNodes/classes/Notification.md)[] + +Defined in: [src/parser/youtube/NotificationsMenu.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/NotificationsMenu.ts#L16) + +*** + +### header + +> **header**: [`SimpleMenuHeader`](../../YTNodes/classes/SimpleMenuHeader.md) + +Defined in: [src/parser/youtube/NotificationsMenu.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/NotificationsMenu.ts#L15) + +## Accessors + +### page + +#### Get Signature + +> **get** **page**(): [`IGetNotificationsMenuResponse`](../../../../type-aliases/IGetNotificationsMenuResponse.md) + +Defined in: [src/parser/youtube/NotificationsMenu.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/NotificationsMenu.ts#L40) + +##### Returns + +[`IGetNotificationsMenuResponse`](../../../../type-aliases/IGetNotificationsMenuResponse.md) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`NotificationsMenu`\> + +Defined in: [src/parser/youtube/NotificationsMenu.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/NotificationsMenu.ts#L29) + +#### Returns + +`Promise`\<`NotificationsMenu`\> diff --git a/docs/api/youtubei.js/namespaces/YT/classes/Playlist.md b/docs/api/youtubei.js/namespaces/YT/classes/Playlist.md new file mode 100644 index 00000000..7ccf57d7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/Playlist.md @@ -0,0 +1,465 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / Playlist + +# Class: Playlist + +Defined in: [src/parser/youtube/Playlist.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L26) + +## Extends + +- [`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new Playlist**(`actions`, `data`, `already_parsed`): `Playlist` + +Defined in: [src/parser/youtube/Playlist.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L32) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`Playlist` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`constructor`](../../Mixins/classes/Feed.md#constructor) + +## Properties + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/youtube/Playlist.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L29) + +*** + +### info + +> **info**: `object` + +Defined in: [src/parser/youtube/Playlist.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L27) + +#### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +#### can\_delete + +> **can\_delete**: `boolean` = `header.can_delete` + +#### can\_reorder + +> **can\_reorder**: `boolean` = `video_list.can_reorder` + +#### can\_share + +> **can\_share**: `boolean` = `header.can_share` + +#### description? + +> `optional` **description**: `string` + +#### is\_editable + +> **is\_editable**: `boolean` = `video_list.is_editable` + +#### last\_updated + +> **last\_updated**: `string` + +#### privacy + +> **privacy**: `string` = `header.privacy` + +#### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) \| `null` + +#### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +#### title? + +> `optional` **title**: `string` + +#### total\_items + +> **total\_items**: `string` + +#### type? + +> `readonly` `optional` **type**: `string` + +#### views + +> **views**: `string` + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/youtube/Playlist.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L28) + +*** + +### messages + +> **messages**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Message`](../../YTNodes/classes/Message.md)\> + +Defined in: [src/parser/youtube/Playlist.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L30) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`actions`](../../Mixins/classes/Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`channels`](../../Mixins/classes/Feed.md#channels) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/youtube/Playlist.ts:73](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L73) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`has_continuation`](../../Mixins/classes/Feed.md#has_continuation) + +*** + +### items + +#### Get Signature + +> **get** **items**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md)\> + +Defined in: [src/parser/youtube/Playlist.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L69) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md)\> + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`memo`](../../Mixins/classes/Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page`](../../Mixins/classes/Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page_contents`](../../Mixins/classes/Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`playlists`](../../Mixins/classes/Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`posts`](../../Mixins/classes/Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`secondary_contents`](../../Mixins/classes/Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`shelves`](../../Mixins/classes/Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`videos`](../../Mixins/classes/Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`Playlist`\> + +Defined in: [src/parser/youtube/Playlist.ts:101](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L101) + +Retrieves next batch of contents and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Returns + +`Promise`\<`Playlist`\> + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuation`](../../Mixins/classes/Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/parser/youtube/Playlist.ts:82](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Playlist.ts#L82) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuationData`](../../Mixins/classes/Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getShelf`](../../Mixins/classes/Feed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getVideosFromMemo`](../../Mixins/classes/Feed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/Search.md b/docs/api/youtubei.js/namespaces/YT/classes/Search.md new file mode 100644 index 00000000..62664cee --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/Search.md @@ -0,0 +1,455 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / Search + +# Class: Search + +Defined in: [src/parser/youtube/Search.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L19) + +## Extends + +- [`Feed`](../../Mixins/classes/Feed.md)\<[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md)\> + +## Constructors + +### Constructor + +> **new Search**(`actions`, `data`, `already_parsed`): `Search` + +Defined in: [src/parser/youtube/Search.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L28) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`ISearchResponse`](../../../../type-aliases/ISearchResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`Search` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`constructor`](../../Mixins/classes/Feed.md#constructor) + +## Properties + +### estimated\_results + +> **estimated\_results**: `number` + +Defined in: [src/parser/youtube/Search.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L23) + +*** + +### header? + +> `optional` **header**: [`SearchHeader`](../../YTNodes/classes/SearchHeader.md) + +Defined in: [src/parser/youtube/Search.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L20) + +*** + +### refinement\_cards? + +> `optional` **refinement\_cards**: [`HorizontalCardList`](../../YTNodes/classes/HorizontalCardList.md) \| `null` + +Defined in: [src/parser/youtube/Search.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L26) + +*** + +### refinements + +> **refinements**: `string`[] + +Defined in: [src/parser/youtube/Search.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L22) + +*** + +### results + +> **results**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/youtube/Search.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L21) + +*** + +### sub\_menu? + +> `optional` **sub\_menu**: [`SearchSubMenu`](../../YTNodes/classes/SearchSubMenu.md) + +Defined in: [src/parser/youtube/Search.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L24) + +*** + +### watch\_card? + +> `optional` **watch\_card**: [`UniversalWatchCard`](../../YTNodes/classes/UniversalWatchCard.md) + +Defined in: [src/parser/youtube/Search.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L25) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`actions`](../../Mixins/classes/Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`channels`](../../Mixins/classes/Feed.md#channels) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`has_continuation`](../../Mixins/classes/Feed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`memo`](../../Mixins/classes/Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page`](../../Mixins/classes/Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page_contents`](../../Mixins/classes/Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`playlists`](../../Mixins/classes/Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`posts`](../../Mixins/classes/Feed.md#posts) + +*** + +### refinement\_card\_queries + +#### Get Signature + +> **get** **refinement\_card\_queries**(): `string`[] + +Defined in: [src/parser/youtube/Search.ts:81](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L81) + +Returns a list of refinement card queries. + +##### Returns + +`string`[] + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`secondary_contents`](../../Mixins/classes/Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`shelves`](../../Mixins/classes/Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`videos`](../../Mixins/classes/Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`Search`\> + +Defined in: [src/parser/youtube/Search.ts:88](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L88) + +Retrieves next batch of search results. + +#### Returns + +`Promise`\<`Search`\> + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuation`](../../Mixins/classes/Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md) \| `undefined`\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuationData`](../../Mixins/classes/Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getShelf`](../../Mixins/classes/Feed.md#getshelf) + +*** + +### selectRefinementCard() + +> **selectRefinementCard**(`card`): `Promise`\<`Search`\> + +Defined in: [src/parser/youtube/Search.ts:57](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Search.ts#L57) + +Applies given refinement card and returns a new Search object. Use [refinement\_card\_queries](#refinement_card_queries) to get a list of available refinement cards. + +#### Parameters + +##### card + +`string` | [`SearchRefinementCard`](../../YTNodes/classes/SearchRefinementCard.md) + +#### Returns + +`Promise`\<`Search`\> + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getVideosFromMemo`](../../Mixins/classes/Feed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YT/classes/Settings.md b/docs/api/youtubei.js/namespaces/YT/classes/Settings.md new file mode 100644 index 00000000..42b53612 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/Settings.md @@ -0,0 +1,137 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / Settings + +# Class: Settings + +Defined in: [src/parser/youtube/Settings.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L19) + +## Constructors + +### Constructor + +> **new Settings**(`actions`, `response`): `Settings` + +Defined in: [src/parser/youtube/Settings.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L27) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +#### Returns + +`Settings` + +## Properties + +### introduction? + +> `optional` **introduction**: [`PageIntroduction`](../../YTNodes/classes/PageIntroduction.md) + +Defined in: [src/parser/youtube/Settings.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L24) + +*** + +### sections + +> **sections**: `object`[] \| `undefined` + +Defined in: [src/parser/youtube/Settings.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L25) + +*** + +### sidebar? + +> `optional` **sidebar**: [`SettingsSidebar`](../../YTNodes/classes/SettingsSidebar.md) + +Defined in: [src/parser/youtube/Settings.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L23) + +## Accessors + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/youtube/Settings.ts:131](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L131) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +*** + +### setting\_options + +#### Get Signature + +> **get** **setting\_options**(): `string`[] + +Defined in: [src/parser/youtube/Settings.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L104) + +Returns settings available in the page. + +##### Returns + +`string`[] + +*** + +### sidebar\_items + +#### Get Signature + +> **get** **sidebar\_items**(): `string`[] + +Defined in: [src/parser/youtube/Settings.ts:124](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L124) + +Returns options available in the sidebar. + +##### Returns + +`string`[] + +## Methods + +### getSettingOption() + +> **getSettingOption**(`name`): [`SettingsSwitch`](../../YTNodes/classes/SettingsSwitch.md) + +Defined in: [src/parser/youtube/Settings.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L78) + +Finds a setting by name and returns it. Use [setting\_options](#setting_options) to see available options. + +#### Parameters + +##### name + +`string` + +#### Returns + +[`SettingsSwitch`](../../YTNodes/classes/SettingsSwitch.md) + +*** + +### selectSidebarItem() + +> **selectSidebarItem**(`target_item`): `Promise`\<`Settings`\> + +Defined in: [src/parser/youtube/Settings.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/Settings.ts#L54) + +Selects an item from the sidebar menu. Use [sidebar\_items](#sidebar_items) to see available items. + +#### Parameters + +##### target\_item + +`string` | [`CompactLink`](../../YTNodes/classes/CompactLink.md) + +#### Returns + +`Promise`\<`Settings`\> diff --git a/docs/api/youtubei.js/namespaces/YT/classes/SmoothedQueue.md b/docs/api/youtubei.js/namespaces/YT/classes/SmoothedQueue.md new file mode 100644 index 00000000..995d8d00 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/SmoothedQueue.md @@ -0,0 +1,159 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / SmoothedQueue + +# Class: SmoothedQueue + +Defined in: [src/parser/youtube/SmoothedQueue.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L46) + +## Constructors + +### Constructor + +> **new SmoothedQueue**(): `SmoothedQueue` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L55) + +#### Returns + +`SmoothedQueue` + +## Accessors + +### action\_queue + +#### Get Signature + +> **get** **action\_queue**(): [`YTNode`](../../Helpers/classes/YTNode.md)[][] + +Defined in: [src/parser/youtube/SmoothedQueue.ts:141](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L141) + +##### Returns + +[`YTNode`](../../Helpers/classes/YTNode.md)[][] + +*** + +### callback + +#### Get Signature + +> **get** **callback**(): (`actions`) => `void` \| `null` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L137) + +##### Returns + +(`actions`) => `void` \| `null` + +#### Set Signature + +> **set** **callback**(`cb`): `void` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L133) + +##### Parameters + +###### cb + +(`actions`) => `void` | `null` + +##### Returns + +`void` + +*** + +### estimated\_update\_interval + +#### Get Signature + +> **get** **estimated\_update\_interval**(): `number` \| `null` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:145](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L145) + +##### Returns + +`number` \| `null` + +*** + +### last\_update\_time + +#### Get Signature + +> **get** **last\_update\_time**(): `number` \| `null` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:149](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L149) + +##### Returns + +`number` \| `null` + +*** + +### next\_update\_id + +#### Get Signature + +> **get** **next\_update\_id**(): `any` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:153](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L153) + +##### Returns + +`any` + +*** + +### poll\_response\_delay\_queue + +#### Get Signature + +> **get** **poll\_response\_delay\_queue**(): `DelayQueue` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:157](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L157) + +##### Returns + +`DelayQueue` + +## Methods + +### clear() + +> **clear**(): `void` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:125](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L125) + +#### Returns + +`void` + +*** + +### emitSmoothedActions() + +> **emitSmoothedActions**(): `void` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:92](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L92) + +#### Returns + +`void` + +*** + +### enqueueActionGroup() + +> **enqueueActionGroup**(`group`): `void` + +Defined in: [src/parser/youtube/SmoothedQueue.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/SmoothedQueue.ts#L64) + +#### Parameters + +##### group + +[`YTNode`](../../Helpers/classes/YTNode.md)[] + +#### Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/YT/classes/TranscriptInfo.md b/docs/api/youtubei.js/namespaces/YT/classes/TranscriptInfo.md new file mode 100644 index 00000000..c211cc50 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/TranscriptInfo.md @@ -0,0 +1,103 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / TranscriptInfo + +# Class: TranscriptInfo + +Defined in: [src/parser/youtube/TranscriptInfo.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/TranscriptInfo.ts#L7) + +## Constructors + +### Constructor + +> **new TranscriptInfo**(`actions`, `response`): `TranscriptInfo` + +Defined in: [src/parser/youtube/TranscriptInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/TranscriptInfo.ts#L12) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +#### Returns + +`TranscriptInfo` + +## Properties + +### transcript + +> **transcript**: [`Transcript`](../../YTNodes/classes/Transcript.md) + +Defined in: [src/parser/youtube/TranscriptInfo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/TranscriptInfo.ts#L10) + +## Accessors + +### languages + +#### Get Signature + +> **get** **languages**(): `string`[] + +Defined in: [src/parser/youtube/TranscriptInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/TranscriptInfo.ts#L45) + +Returns available languages. + +##### Returns + +`string`[] + +*** + +### page + +#### Get Signature + +> **get** **page**(): [`IGetTranscriptResponse`](../../../../type-aliases/IGetTranscriptResponse.md) + +Defined in: [src/parser/youtube/TranscriptInfo.ts:56](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/TranscriptInfo.ts#L56) + +##### Returns + +[`IGetTranscriptResponse`](../../../../type-aliases/IGetTranscriptResponse.md) + +*** + +### selectedLanguage + +#### Get Signature + +> **get** **selectedLanguage**(): `string` + +Defined in: [src/parser/youtube/TranscriptInfo.ts:52](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/TranscriptInfo.ts#L52) + +Returns the currently selected language. + +##### Returns + +`string` + +## Methods + +### selectLanguage() + +> **selectLanguage**(`language`): `Promise`\<`TranscriptInfo`\> + +Defined in: [src/parser/youtube/TranscriptInfo.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/TranscriptInfo.ts#L26) + +Selects a language from the language menu and returns the updated transcript. + +#### Parameters + +##### language + +`string` + +Language to select. + +#### Returns + +`Promise`\<`TranscriptInfo`\> diff --git a/docs/api/youtubei.js/namespaces/YT/classes/VideoInfo.md b/docs/api/youtubei.js/namespaces/YT/classes/VideoInfo.md new file mode 100644 index 00000000..dab9d75a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YT/classes/VideoInfo.md @@ -0,0 +1,845 @@ +[youtubei.js](../../../../README.md) / [YT](../README.md) / VideoInfo + +# Class: VideoInfo + +Defined in: [src/parser/youtube/VideoInfo.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L38) + +## Extends + +- [`MediaInfo`](../../Mixins/classes/MediaInfo.md) + +## Constructors + +### Constructor + +> **new VideoInfo**(`data`, `actions`, `cpn`): `VideoInfo` + +Defined in: [src/parser/youtube/VideoInfo.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L54) + +#### Parameters + +##### data + +\[[`ApiResponse`](../../../../interfaces/ApiResponse.md), [`ApiResponse`](../../../../interfaces/ApiResponse.md)?\] + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### cpn + +`string` + +#### Returns + +`VideoInfo` + +#### Overrides + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`constructor`](../../Mixins/classes/MediaInfo.md#constructor) + +## Properties + +### annotations? + +> `optional` **annotations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlayerAnnotationsExpanded`](../../YTNodes/classes/PlayerAnnotationsExpanded.md)\> + +Defined in: [src/core/mixins/MediaInfo.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L40) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`annotations`](../../Mixins/classes/MediaInfo.md#annotations) + +*** + +### autoplay? + +> `optional` **autoplay**: `object` + +Defined in: [src/parser/youtube/VideoInfo.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L49) + +#### count\_down\_secs? + +> `optional` **count\_down\_secs**: `number` + +#### modified\_sets? + +> `optional` **modified\_sets**: `AutoplaySet`[] + +#### sets + +> **sets**: `AutoplaySet`[] + +*** + +### basic\_info + +> **basic\_info**: `object` + +Defined in: [src/core/mixins/MediaInfo.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L39) + +#### allow\_ratings? + +> `optional` **allow\_ratings**: `boolean` + +#### author? + +> `optional` **author**: `string` + +#### category + +> **category**: `string` \| `null` + +#### channel + +> **channel**: \{ `id`: `string`; `name`: `string`; `url`: `string`; \} \| `null` + +#### channel\_id? + +> `optional` **channel\_id**: `string` + +#### duration? + +> `optional` **duration**: `number` + +#### embed + +> **embed**: \{ `flash_secure_url`: `string`; `flash_url`: `string`; `height`: `any`; `iframe_url`: `string`; `width`: `any`; \} \| `null` \| `undefined` + +#### end\_timestamp + +> **end\_timestamp**: `Date` \| `null` + +#### has\_ypc\_metadata + +> **has\_ypc\_metadata**: `boolean` \| `null` + +#### id? + +> `optional` **id**: `string` + +#### is\_crawlable? + +> `optional` **is\_crawlable**: `boolean` + +#### is\_disliked + +> **is\_disliked**: `boolean` \| `undefined` + +#### is\_family\_safe + +> **is\_family\_safe**: `boolean` \| `undefined` = `info.microformat.is_family_safe` + +#### is\_liked + +> **is\_liked**: `boolean` \| `undefined` + +#### is\_live? + +> `optional` **is\_live**: `boolean` + +#### is\_live\_content? + +> `optional` **is\_live\_content**: `boolean` + +#### is\_live\_dvr\_enabled? + +> `optional` **is\_live\_dvr\_enabled**: `boolean` + +#### is\_low\_latency\_live\_stream? + +> `optional` **is\_low\_latency\_live\_stream**: `boolean` + +#### is\_owner\_viewing? + +> `optional` **is\_owner\_viewing**: `boolean` + +#### is\_post\_live\_dvr? + +> `optional` **is\_post\_live\_dvr**: `boolean` + +#### is\_private? + +> `optional` **is\_private**: `boolean` + +#### is\_unlisted + +> **is\_unlisted**: `boolean` \| `undefined` = `info.microformat.is_unlisted` + +#### is\_upcoming? + +> `optional` **is\_upcoming**: `boolean` + +#### keywords? + +> `optional` **keywords**: `string`[] + +#### like\_count + +> **like\_count**: `number` \| `undefined` + +#### live\_chunk\_readahead? + +> `optional` **live\_chunk\_readahead**: `number` + +#### short\_description? + +> `optional` **short\_description**: `string` + +#### start\_timestamp + +> **start\_timestamp**: `Date` \| `null` + +#### tags + +> **tags**: `string`[] \| `null` + +#### thumbnail? + +> `optional` **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +#### title? + +> `optional` **title**: `string` + +#### url\_canonical + +> **url\_canonical**: `string` \| `null` + +#### view\_count + +> **view\_count**: `number` \| `undefined` + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`basic_info`](../../Mixins/classes/MediaInfo.md#basic_info) + +*** + +### captions? + +> `optional` **captions**: [`PlayerCaptionsTracklist`](../../YTNodes/classes/PlayerCaptionsTracklist.md) + +Defined in: [src/core/mixins/MediaInfo.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L43) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`captions`](../../Mixins/classes/MediaInfo.md#captions) + +*** + +### cards? + +> `optional` **cards**: [`CardCollection`](../../YTNodes/classes/CardCollection.md) + +Defined in: [src/core/mixins/MediaInfo.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L44) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`cards`](../../Mixins/classes/MediaInfo.md#cards) + +*** + +### comments\_entry\_point\_header? + +> `optional` **comments\_entry\_point\_header**: [`CommentsEntryPointHeader`](../../YTNodes/classes/CommentsEntryPointHeader.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L47) + +*** + +### endscreen? + +> `optional` **endscreen**: [`Endscreen`](../../YTNodes/classes/Endscreen.md) + +Defined in: [src/core/mixins/MediaInfo.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L42) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`endscreen`](../../Mixins/classes/MediaInfo.md#endscreen) + +*** + +### game\_info? + +> `optional` **game\_info**: `object` + +Defined in: [src/parser/youtube/VideoInfo.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L42) + +#### release\_year + +> **release\_year**: [`Text`](../../Misc/classes/Text.md) \| `undefined` + +#### title + +> **title**: [`Text`](../../Misc/classes/Text.md) \| `undefined` + +*** + +### heat\_map? + +> `optional` **heat\_map**: [`Heatmap`](../../YTNodes/classes/Heatmap.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L50) + +*** + +### livechat? + +> `optional` **livechat**: [`LiveChat`](../../YTNodes/classes/LiveChat.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:48](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L48) + +*** + +### merchandise? + +> `optional` **merchandise**: [`MerchandiseShelf`](../../YTNodes/classes/MerchandiseShelf.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L43) + +*** + +### playability\_status? + +> `optional` **playability\_status**: [`IPlayabilityStatus`](../../../../interfaces/IPlayabilityStatus.md) + +Defined in: [src/core/mixins/MediaInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L46) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`playability_status`](../../Mixins/classes/MediaInfo.md#playability_status) + +*** + +### player\_config? + +> `optional` **player\_config**: [`IPlayerConfig`](../../../../interfaces/IPlayerConfig.md) + +Defined in: [src/core/mixins/MediaInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L47) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`player_config`](../../Mixins/classes/MediaInfo.md#player_config) + +*** + +### player\_overlays? + +> `optional` **player\_overlays**: [`PlayerOverlay`](../../YTNodes/classes/PlayerOverlay.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L46) + +*** + +### playlist? + +> `optional` **playlist**: `object` + +Defined in: [src/parser/youtube/VideoInfo.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L41) + +#### author + +> **author**: [`Text`](../../Misc/classes/Text.md) \| [`Author`](../../Misc/classes/Author.md) + +#### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +#### current\_index + +> **current\_index**: `number` + +#### id + +> **id**: `string` + +#### is\_infinite + +> **is\_infinite**: `boolean` + +#### menu + +> **menu**: [`Menu`](../../YTNodes/classes/Menu.md) \| `null` + +#### title + +> **title**: `string` + +*** + +### primary\_info? + +> `optional` **primary\_info**: [`VideoPrimaryInfo`](../../YTNodes/classes/VideoPrimaryInfo.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L39) + +*** + +### related\_chip\_cloud? + +> `optional` **related\_chip\_cloud**: [`ChipCloud`](../../YTNodes/classes/ChipCloud.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L44) + +*** + +### secondary\_info? + +> `optional` **secondary\_info**: [`VideoSecondaryInfo`](../../YTNodes/classes/VideoSecondaryInfo.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L40) + +*** + +### storyboards? + +> `optional` **storyboards**: [`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md) \| [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md) + +Defined in: [src/core/mixins/MediaInfo.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L41) + +#### Inherited from + +[`ShortFormVideoInfo`](../../YTShorts/classes/ShortFormVideoInfo.md).[`storyboards`](../../YTShorts/classes/ShortFormVideoInfo.md#storyboards) + +*** + +### streaming\_data? + +> `optional` **streaming\_data**: [`IStreamingData`](../../../../interfaces/IStreamingData.md) + +Defined in: [src/core/mixins/MediaInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L45) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`streaming_data`](../../Mixins/classes/MediaInfo.md#streaming_data) + +*** + +### watch\_next\_feed? + +> `optional` **watch\_next\_feed**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L45) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/MediaInfo.ts:247](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L247) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`actions`](../../Mixins/classes/MediaInfo.md#actions) + +*** + +### autoplay\_video\_endpoint + +#### Get Signature + +> **get** **autoplay\_video\_endpoint**(): [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:410](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L410) + +Gets the endpoint of the autoplay video + +##### Returns + +[`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) \| `null` + +*** + +### cpn + +#### Get Signature + +> **get** **cpn**(): `string` + +Defined in: [src/core/mixins/MediaInfo.ts:254](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L254) + +Content Playback Nonce. + +##### Returns + +`string` + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`cpn`](../../Mixins/classes/MediaInfo.md#cpn) + +*** + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/parser/youtube/VideoInfo.ts:396](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L396) + +Watch next feed filters. + +##### Returns + +`string`[] + +*** + +### has\_trailer + +#### Get Signature + +> **get** **has\_trailer**(): `boolean` + +Defined in: [src/parser/youtube/VideoInfo.ts:417](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L417) + +Checks if trailer is available. + +##### Returns + +`boolean` + +*** + +### music\_tracks + +#### Get Signature + +> **get** **music\_tracks**(): `object`[] + +Defined in: [src/parser/youtube/VideoInfo.ts:424](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L424) + +Get songs used in the video. + +##### Returns + +`object`[] + +*** + +### page + +#### Get Signature + +> **get** **page**(): \[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] + +Defined in: [src/core/mixins/MediaInfo.ts:261](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L261) + +Parsed InnerTube response. + +##### Returns + +\[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] + +#### Inherited from + +[`ShortFormVideoInfo`](../../YTShorts/classes/ShortFormVideoInfo.md).[`page`](../../YTShorts/classes/ShortFormVideoInfo.md#page) + +*** + +### wn\_has\_continuation + +#### Get Signature + +> **get** **wn\_has\_continuation**(): `boolean` + +Defined in: [src/parser/youtube/VideoInfo.ts:403](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L403) + +Checks if continuation is available for the watch next feed. + +##### Returns + +`boolean` + +## Methods + +### addToWatchHistory() + +> **addToWatchHistory**(): `Promise`\<`Response`\> + +Defined in: [src/parser/youtube/VideoInfo.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L195) + +Adds video to the watch history. + +#### Returns + +`Promise`\<`Response`\> + +#### Overrides + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`addToWatchHistory`](../../Mixins/classes/MediaInfo.md#addtowatchhistory) + +*** + +### chooseFormat() + +> **chooseFormat**(`options`): [`Format`](../../Misc/classes/Format.md) + +Defined in: [src/core/mixins/MediaInfo.ts:161](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L161) + +Selects the format that best matches the given options. + +#### Parameters + +##### options + +[`FormatOptions`](../../Types/interfaces/FormatOptions.md) + +Options + +#### Returns + +[`Format`](../../Misc/classes/Format.md) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`chooseFormat`](../../Mixins/classes/MediaInfo.md#chooseformat) + +*** + +### dislike() + +> **dislike**(): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/youtube/VideoInfo.ts:272](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L272) + +Dislikes the video. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### download() + +> **download**(`options`): `Promise`\<`ReadableStream`\<`Uint8Array`\>\> + +Defined in: [src/core/mixins/MediaInfo.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L169) + +Downloads the video. + +#### Parameters + +##### options + +[`DownloadOptions`](../../Types/interfaces/DownloadOptions.md) = `{}` + +Download options. + +#### Returns + +`Promise`\<`ReadableStream`\<`Uint8Array`\>\> + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`download`](../../Mixins/classes/MediaInfo.md#download) + +*** + +### getLiveChat() + +> **getLiveChat**(): [`LiveChat`](LiveChat.md) + +Defined in: [src/parser/youtube/VideoInfo.ts:367](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L367) + +Retrieves Live Chat if available. + +#### Returns + +[`LiveChat`](LiveChat.md) + +*** + +### getStreamingInfo() + +> **getStreamingInfo**(`url_transformer?`, `format_filter?`): `Promise`\<`StreamingInfo`\> + +Defined in: [src/core/mixins/MediaInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L144) + +Get a cleaned up representation of the adaptive_formats + +#### Parameters + +##### url\_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) + +##### format\_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) + +#### Returns + +`Promise`\<`StreamingInfo`\> + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`getStreamingInfo`](../../Mixins/classes/MediaInfo.md#getstreaminginfo) + +*** + +### getTrailerInfo() + +> **getTrailerInfo**(): `VideoInfo` \| `null` + +Defined in: [src/parser/youtube/VideoInfo.ts:377](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L377) + +Retrieves trailer info if available (typically for non-purchased movies or films). + +#### Returns + +`VideoInfo` \| `null` + +`VideoInfo` for the trailer, or `null` if none. + +*** + +### getTranscript() + +> **getTranscript**(): `Promise`\<[`TranscriptInfo`](TranscriptInfo.md)\> + +Defined in: [src/core/mixins/MediaInfo.ts:182](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L182) + +Retrieves the video's transcript. + +#### Returns + +`Promise`\<[`TranscriptInfo`](TranscriptInfo.md)\> + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`getTranscript`](../../Mixins/classes/MediaInfo.md#gettranscript) + +*** + +### getWatchNextContinuation() + +> **getWatchNextContinuation**(): `Promise`\<`VideoInfo`\> + +Defined in: [src/parser/youtube/VideoInfo.ts:209](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L209) + +Retrieves watch next feed continuation. + +#### Returns + +`Promise`\<`VideoInfo`\> + +*** + +### like() + +> **like**(): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/youtube/VideoInfo.ts:232](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L232) + +Likes the video. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### removeRating() + +> **removeRating**(): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/youtube/VideoInfo.ts:312](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L312) + +Removes like/dislike. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### selectFilter() + +> **selectFilter**(`target_filter`): `Promise`\<`VideoInfo`\> + +Defined in: [src/parser/youtube/VideoInfo.ts:161](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L161) + +Applies given filter to the watch next feed. Use [filters](#filters) to get available filters. + +#### Parameters + +##### target\_filter + +Filter to apply. + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) | `undefined` + +#### Returns + +`Promise`\<`VideoInfo`\> + +*** + +### toDash() + +> **toDash**(`options`): `Promise`\<`string`\> + +Defined in: [src/core/mixins/MediaInfo.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L104) + +Generates a DASH manifest from the streaming data. + +#### Parameters + +##### options + +###### format_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) + +###### manifest_options? + +`DashOptions` + +###### url_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) + +#### Returns + +`Promise`\<`string`\> + +DASH manifest + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`toDash`](../../Mixins/classes/MediaInfo.md#todash) + +*** + +### updateWatchTime() + +> **updateWatchTime**(`startTime`): `Promise`\<`Response`\> + +Defined in: [src/parser/youtube/VideoInfo.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/youtube/VideoInfo.ts#L202) + +Updates watch time for the video. + +#### Parameters + +##### startTime + +`number` + +#### Returns + +`Promise`\<`Response`\> + +#### Overrides + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`updateWatchTime`](../../Mixins/classes/MediaInfo.md#updatewatchtime) diff --git a/docs/api/namespaces/YTKids/README.md b/docs/api/youtubei.js/namespaces/YTKids/README.md similarity index 69% rename from docs/api/namespaces/YTKids/README.md rename to docs/api/youtubei.js/namespaces/YTKids/README.md index 00a66e7b..fd25a3c7 100644 --- a/docs/api/namespaces/YTKids/README.md +++ b/docs/api/youtubei.js/namespaces/YTKids/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / YTKids +[youtubei.js](../../../README.md) / YTKids # YTKids -## Index - -### Classes +## Classes - [Channel](classes/Channel.md) - [HomeFeed](classes/HomeFeed.md) diff --git a/docs/api/youtubei.js/namespaces/YTKids/classes/Channel.md b/docs/api/youtubei.js/namespaces/YTKids/classes/Channel.md new file mode 100644 index 00000000..a28e1901 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTKids/classes/Channel.md @@ -0,0 +1,379 @@ +[youtubei.js](../../../../README.md) / [YTKids](../README.md) / Channel + +# Class: Channel + +Defined in: [src/parser/ytkids/Channel.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Channel.ts#L10) + +## Extends + +- [`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new Channel**(`actions`, `data`, `already_parsed`): `Channel` + +Defined in: [src/parser/ytkids/Channel.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Channel.ts#L14) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`Channel` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`constructor`](../../Mixins/classes/Feed.md#constructor) + +## Properties + +### contents? + +> `optional` **contents**: [`ItemSection`](../../YTNodes/classes/ItemSection.md) \| [`ItemSectionContinuation`](../../../../classes/ItemSectionContinuation.md) + +Defined in: [src/parser/ytkids/Channel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Channel.ts#L12) + +*** + +### header? + +> `optional` **header**: [`C4TabbedHeader`](../../YTNodes/classes/C4TabbedHeader.md) + +Defined in: [src/parser/ytkids/Channel.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Channel.ts#L11) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`actions`](../../Mixins/classes/Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`channels`](../../Mixins/classes/Feed.md#channels) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/ytkids/Channel.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Channel.ts#L39) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`has_continuation`](../../Mixins/classes/Feed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`memo`](../../Mixins/classes/Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page`](../../Mixins/classes/Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page_contents`](../../Mixins/classes/Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`playlists`](../../Mixins/classes/Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`posts`](../../Mixins/classes/Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`secondary_contents`](../../Mixins/classes/Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`shelves`](../../Mixins/classes/Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`videos`](../../Mixins/classes/Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`Channel`\> + +Defined in: [src/parser/ytkids/Channel.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Channel.ts#L23) + +Retrieves next batch of content. + +#### Returns + +`Promise`\<`Channel`\> + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuation`](../../Mixins/classes/Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuationData`](../../Mixins/classes/Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getShelf`](../../Mixins/classes/Feed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getVideosFromMemo`](../../Mixins/classes/Feed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YTKids/classes/HomeFeed.md b/docs/api/youtubei.js/namespaces/YTKids/classes/HomeFeed.md new file mode 100644 index 00000000..df40ecdd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTKids/classes/HomeFeed.md @@ -0,0 +1,415 @@ +[youtubei.js](../../../../README.md) / [YTKids](../README.md) / HomeFeed + +# Class: HomeFeed + +Defined in: [src/parser/ytkids/HomeFeed.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/HomeFeed.ts#L11) + +## Extends + +- [`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\> + +## Constructors + +### Constructor + +> **new HomeFeed**(`actions`, `data`, `already_parsed`): `HomeFeed` + +Defined in: [src/parser/ytkids/HomeFeed.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/HomeFeed.ts#L15) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +##### already\_parsed + +`boolean` = `false` + +#### Returns + +`HomeFeed` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`constructor`](../../Mixins/classes/Feed.md#constructor) + +## Properties + +### contents? + +> `optional` **contents**: [`KidsHomeScreen`](../../YTNodes/classes/KidsHomeScreen.md) + +Defined in: [src/parser/ytkids/HomeFeed.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/HomeFeed.ts#L13) + +*** + +### header? + +> `optional` **header**: [`KidsCategoriesHeader`](../../YTNodes/classes/KidsCategoriesHeader.md) + +Defined in: [src/parser/ytkids/HomeFeed.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/HomeFeed.ts#L12) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`actions`](../../Mixins/classes/Feed.md#actions) + +*** + +### categories + +#### Get Signature + +> **get** **categories**(): `string`[] + +Defined in: [src/parser/ytkids/HomeFeed.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/HomeFeed.ts#L46) + +##### Returns + +`string`[] + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`channels`](../../Mixins/classes/Feed.md#channels) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`has_continuation`](../../Mixins/classes/Feed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`memo`](../../Mixins/classes/Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page`](../../Mixins/classes/Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page_contents`](../../Mixins/classes/Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`playlists`](../../Mixins/classes/Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`posts`](../../Mixins/classes/Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`secondary_contents`](../../Mixins/classes/Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`shelves`](../../Mixins/classes/Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`videos`](../../Mixins/classes/Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +Defined in: [src/core/mixins/Feed.ts:219](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L219) + +Retrieves next batch of contents and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Returns + +`Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md)\>\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuation`](../../Mixins/classes/Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) \| `undefined`\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuationData`](../../Mixins/classes/Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getShelf`](../../Mixins/classes/Feed.md#getshelf) + +*** + +### selectCategoryTab() + +> **selectCategoryTab**(`tab`): `Promise`\<`HomeFeed`\> + +Defined in: [src/parser/ytkids/HomeFeed.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/HomeFeed.ts#L25) + +Retrieves the contents of the given category tab. Use [HomeFeed.categories](#categories) to get a list of available categories. + +#### Parameters + +##### tab + +The tab to select + +`string` | [`KidsCategoryTab`](../../YTNodes/classes/KidsCategoryTab.md) + +#### Returns + +`Promise`\<`HomeFeed`\> + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getVideosFromMemo`](../../Mixins/classes/Feed.md#getvideosfrommemo) diff --git a/docs/api/youtubei.js/namespaces/YTKids/classes/Search.md b/docs/api/youtubei.js/namespaces/YTKids/classes/Search.md new file mode 100644 index 00000000..600361e3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTKids/classes/Search.md @@ -0,0 +1,375 @@ +[youtubei.js](../../../../README.md) / [YTKids](../README.md) / Search + +# Class: Search + +Defined in: [src/parser/ytkids/Search.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Search.ts#L9) + +## Extends + +- [`Feed`](../../Mixins/classes/Feed.md)\<[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md)\> + +## Constructors + +### Constructor + +> **new Search**(`actions`, `data`): `Search` + +Defined in: [src/parser/ytkids/Search.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Search.ts#L13) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### data + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) | [`ISearchResponse`](../../../../type-aliases/ISearchResponse.md) + +#### Returns + +`Search` + +#### Overrides + +[`Feed`](../../Mixins/classes/Feed.md).[`constructor`](../../Mixins/classes/Feed.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> \| `null` + +Defined in: [src/parser/ytkids/Search.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Search.ts#L11) + +*** + +### estimated\_results? + +> `optional` **estimated\_results**: `number` + +Defined in: [src/parser/ytkids/Search.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/Search.ts#L10) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/Feed.ts:181](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L181) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`actions`](../../Mixins/classes/Feed.md#actions) + +*** + +### channels + +#### Get Signature + +> **get** **channels**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +Defined in: [src/core/mixins/Feed.ts:126](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L126) + +Get all the channels in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Channel`](../../YTNodes/classes/Channel.md) \| [`GridChannel`](../../YTNodes/classes/GridChannel.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`channels`](../../Mixins/classes/Feed.md#channels) + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/core/mixins/Feed.ts:195](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L195) + +Checks if the feed has continuation. + +##### Returns + +`boolean` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`has_continuation`](../../Mixins/classes/Feed.md#has_continuation) + +*** + +### memo + +#### Get Signature + +> **get** **memo**(): [`Memo`](../../Helpers/classes/Memo.md) + +Defined in: [src/core/mixins/Feed.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L137) + +##### Returns + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`memo`](../../Mixins/classes/Feed.md#memo) + +*** + +### page + +#### Get Signature + +> **get** **page**(): `T` + +Defined in: [src/core/mixins/Feed.ts:188](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L188) + +Get the original page data + +##### Returns + +`T` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page`](../../Mixins/classes/Feed.md#page) + +*** + +### page\_contents + +#### Get Signature + +> **get** **page\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +Defined in: [src/core/mixins/Feed.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L144) + +Returns contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`ReloadContinuationItemsCommand`](../../../../classes/ReloadContinuationItemsCommand.md) + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`page_contents`](../../Mixins/classes/Feed.md#page_contents) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L133) + +Get all playlists in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`playlists`](../../Mixins/classes/Feed.md#playlists) + +*** + +### posts + +#### Get Signature + +> **get** **posts**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +Defined in: [src/core/mixins/Feed.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L119) + +Get all the community posts in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstagePost`](../../YTNodes/classes/BackstagePost.md) \| [`Post`](../../YTNodes/classes/Post.md) \| [`SharedPost`](../../YTNodes/classes/SharedPost.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`posts`](../../Mixins/classes/Feed.md#posts) + +*** + +### secondary\_contents + +#### Get Signature + +> **get** **secondary\_contents**(): [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +Defined in: [src/core/mixins/Feed.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L169) + +Returns secondary contents from the page. + +##### Returns + +[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`BrowseFeedActions`](../../YTNodes/classes/BrowseFeedActions.md) \| [`ProfileColumn`](../../YTNodes/classes/ProfileColumn.md) \| [`SecondarySearchContainer`](../../YTNodes/classes/SecondarySearchContainer.md) \| `null` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`secondary_contents`](../../Mixins/classes/Feed.md#secondary_contents) + +*** + +### shelves + +#### Get Signature + +> **get** **shelves**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +Defined in: [src/core/mixins/Feed.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L155) + +Returns all segments/sections from the page. + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`shelves`](../../Mixins/classes/Feed.md#shelves) + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:112](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L112) + +Get all the videos in the feed + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`videos`](../../Mixins/classes/Feed.md#videos) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md)\>\> + +Defined in: [src/core/mixins/Feed.ts:219](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L219) + +Retrieves next batch of contents and returns a new [Feed](../../Mixins/classes/Feed.md) object. + +#### Returns + +`Promise`\<[`Feed`](../../Mixins/classes/Feed.md)\<[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md)\>\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuation`](../../Mixins/classes/Feed.md#getcontinuation) + +*** + +### getContinuationData() + +> **getContinuationData**(): `Promise`\<[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md) \| `undefined`\> + +Defined in: [src/core/mixins/Feed.ts:202](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L202) + +Retrieves continuation data as it is. + +#### Returns + +`Promise`\<[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md) \| `undefined`\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getContinuationData`](../../Mixins/classes/Feed.md#getcontinuationdata) + +*** + +### getShelf() + +> **getShelf**(`title`): [`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +Defined in: [src/core/mixins/Feed.ts:162](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L162) + +Finds shelf by title. + +#### Parameters + +##### title + +`string` + +#### Returns + +[`ReelShelf`](../../YTNodes/classes/ReelShelf.md) \| [`RichShelf`](../../YTNodes/classes/RichShelf.md) \| [`Shelf`](../../YTNodes/classes/Shelf.md) \| `undefined` + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getShelf`](../../Mixins/classes/Feed.md#getshelf) + +*** + +### getPlaylistsFromMemo() + +> `static` **getPlaylistsFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +Defined in: [src/core/mixins/Feed.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L94) + +Get all playlists on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`GridPlaylist`](../../YTNodes/classes/GridPlaylist.md) \| [`LockupView`](../../YTNodes/classes/LockupView.md) \| [`Playlist`](../../YTNodes/classes/Playlist.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getPlaylistsFromMemo`](../../Mixins/classes/Feed.md#getplaylistsfrommemo) + +*** + +### getVideosFromMemo() + +> `static` **getVideosFromMemo**(`memo`): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +Defined in: [src/core/mixins/Feed.ts:78](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/Feed.ts#L78) + +Get all videos on a given page via memo + +#### Parameters + +##### memo + +[`Memo`](../../Helpers/classes/Memo.md) + +#### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactVideo`](../../YTNodes/classes/CompactVideo.md) \| [`GridVideo`](../../YTNodes/classes/GridVideo.md) \| [`PlaylistPanelVideo`](../../YTNodes/classes/PlaylistPanelVideo.md) \| [`PlaylistVideo`](../../YTNodes/classes/PlaylistVideo.md) \| [`ReelItem`](../../YTNodes/classes/ReelItem.md) \| [`ShortsLockupView`](../../YTNodes/classes/ShortsLockupView.md) \| [`Video`](../../YTNodes/classes/Video.md) \| [`WatchCardCompactVideo`](../../YTNodes/classes/WatchCardCompactVideo.md)\> + +#### Inherited from + +[`Feed`](../../Mixins/classes/Feed.md).[`getVideosFromMemo`](../../Mixins/classes/Feed.md#getvideosfrommemo) diff --git a/docs/api/namespaces/YTKids/classes/VideoInfo.md b/docs/api/youtubei.js/namespaces/YTKids/classes/VideoInfo.md similarity index 51% rename from docs/api/namespaces/YTKids/classes/VideoInfo.md rename to docs/api/youtubei.js/namespaces/YTKids/classes/VideoInfo.md index caf0b81c..d2074c9e 100644 --- a/docs/api/namespaces/YTKids/classes/VideoInfo.md +++ b/docs/api/youtubei.js/namespaces/YTKids/classes/VideoInfo.md @@ -1,36 +1,42 @@ -[youtubei.js](../../../README.md) / [YTKids](../README.md) / VideoInfo +[youtubei.js](../../../../README.md) / [YTKids](../README.md) / VideoInfo # Class: VideoInfo +Defined in: [src/parser/ytkids/VideoInfo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/VideoInfo.ts#L11) + ## Extends - [`MediaInfo`](../../Mixins/classes/MediaInfo.md) ## Constructors -### new VideoInfo() +### Constructor -> **new VideoInfo**(`data`, `actions`, `cpn`): [`VideoInfo`](VideoInfo.md) +> **new VideoInfo**(`data`, `actions`, `cpn`): `VideoInfo` + +Defined in: [src/parser/ytkids/VideoInfo.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/VideoInfo.ts#L17) #### Parameters -• **data**: [[`ApiResponse`](../../../interfaces/ApiResponse.md), `ApiResponse?`] +##### data -• **actions**: [`Actions`](../../../classes/Actions.md) +\[[`ApiResponse`](../../../../interfaces/ApiResponse.md), [`ApiResponse`](../../../../interfaces/ApiResponse.md)?\] -• **cpn**: `string` +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### cpn + +`string` #### Returns -[`VideoInfo`](VideoInfo.md) +`VideoInfo` #### Overrides -[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`constructor`](../../Mixins/classes/MediaInfo.md#constructors) - -#### Defined in - -[src/parser/ytkids/VideoInfo.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytkids/VideoInfo.ts#L17) +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`constructor`](../../Mixins/classes/MediaInfo.md#constructor) ## Properties @@ -38,20 +44,20 @@ > `optional` **annotations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlayerAnnotationsExpanded`](../../YTNodes/classes/PlayerAnnotationsExpanded.md)\> +Defined in: [src/core/mixins/MediaInfo.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L40) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`annotations`](../../Mixins/classes/MediaInfo.md#annotations) -#### Defined in - -[src/core/mixins/MediaInfo.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L40) - *** ### basic\_info > **basic\_info**: `object` +Defined in: [src/core/mixins/MediaInfo.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L39) + #### allow\_ratings? > `optional` **allow\_ratings**: `boolean` @@ -62,11 +68,11 @@ #### category -> **category**: `null` \| `string` +> **category**: `string` \| `null` #### channel -> **channel**: `null` \| `object` +> **channel**: \{ `id`: `string`; `name`: `string`; `url`: `string`; \} \| `null` #### channel\_id? @@ -78,15 +84,15 @@ #### embed -> **embed**: `undefined` \| `null` \| `object` +> **embed**: \{ `flash_secure_url`: `string`; `flash_url`: `string`; `height`: `any`; `iframe_url`: `string`; `width`: `any`; \} \| `null` \| `undefined` #### end\_timestamp -> **end\_timestamp**: `null` \| `Date` +> **end\_timestamp**: `Date` \| `null` #### has\_ypc\_metadata -> **has\_ypc\_metadata**: `null` \| `boolean` +> **has\_ypc\_metadata**: `boolean` \| `null` #### id? @@ -98,15 +104,15 @@ #### is\_disliked -> **is\_disliked**: `undefined` \| `boolean` +> **is\_disliked**: `boolean` \| `undefined` #### is\_family\_safe -> **is\_family\_safe**: `undefined` \| `boolean` = `info.microformat.is_family_safe` +> **is\_family\_safe**: `boolean` \| `undefined` = `info.microformat.is_family_safe` #### is\_liked -> **is\_liked**: `undefined` \| `boolean` +> **is\_liked**: `boolean` \| `undefined` #### is\_live? @@ -138,7 +144,7 @@ #### is\_unlisted -> **is\_unlisted**: `undefined` \| `boolean` = `info.microformat.is_unlisted` +> **is\_unlisted**: `boolean` \| `undefined` = `info.microformat.is_unlisted` #### is\_upcoming? @@ -150,7 +156,7 @@ #### like\_count -> **like\_count**: `undefined` \| `number` +> **like\_count**: `number` \| `undefined` #### live\_chunk\_readahead? @@ -162,11 +168,11 @@ #### start\_timestamp -> **start\_timestamp**: `null` \| `Date` +> **start\_timestamp**: `Date` \| `null` #### tags -> **tags**: `null` \| `string`[] +> **tags**: `string`[] \| `null` #### thumbnail? @@ -178,57 +184,47 @@ #### url\_canonical -> **url\_canonical**: `null` \| `string` +> **url\_canonical**: `string` \| `null` #### view\_count -> **view\_count**: `undefined` \| `number` +> **view\_count**: `number` \| `undefined` #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`basic_info`](../../Mixins/classes/MediaInfo.md#basic_info) -#### Defined in - -[src/core/mixins/MediaInfo.ts:39](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L39) - *** ### captions? > `optional` **captions**: [`PlayerCaptionsTracklist`](../../YTNodes/classes/PlayerCaptionsTracklist.md) +Defined in: [src/core/mixins/MediaInfo.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L43) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`captions`](../../Mixins/classes/MediaInfo.md#captions) -#### Defined in - -[src/core/mixins/MediaInfo.ts:43](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L43) - *** ### cards? > `optional` **cards**: [`CardCollection`](../../YTNodes/classes/CardCollection.md) +Defined in: [src/core/mixins/MediaInfo.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L44) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`cards`](../../Mixins/classes/MediaInfo.md#cards) -#### Defined in - -[src/core/mixins/MediaInfo.ts:44](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L44) - *** ### current\_video\_endpoint? > `optional` **current\_video\_endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) -#### Defined in - -[src/parser/ytkids/VideoInfo.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytkids/VideoInfo.ts#L14) +Defined in: [src/parser/ytkids/VideoInfo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/VideoInfo.ts#L14) *** @@ -236,51 +232,43 @@ > `optional` **endscreen**: [`Endscreen`](../../YTNodes/classes/Endscreen.md) +Defined in: [src/core/mixins/MediaInfo.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L42) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`endscreen`](../../Mixins/classes/MediaInfo.md#endscreen) -#### Defined in - -[src/core/mixins/MediaInfo.ts:42](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L42) - *** ### playability\_status? -> `optional` **playability\_status**: [`IPlayabilityStatus`](../../APIResponseTypes/interfaces/IPlayabilityStatus.md) +> `optional` **playability\_status**: [`IPlayabilityStatus`](../../../../interfaces/IPlayabilityStatus.md) + +Defined in: [src/core/mixins/MediaInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L46) #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`playability_status`](../../Mixins/classes/MediaInfo.md#playability_status) -#### Defined in - -[src/core/mixins/MediaInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L46) - *** ### player\_config? -> `optional` **player\_config**: [`IPlayerConfig`](../../APIResponseTypes/interfaces/IPlayerConfig.md) +> `optional` **player\_config**: [`IPlayerConfig`](../../../../interfaces/IPlayerConfig.md) + +Defined in: [src/core/mixins/MediaInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L47) #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`player_config`](../../Mixins/classes/MediaInfo.md#player_config) -#### Defined in - -[src/core/mixins/MediaInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L47) - *** ### player\_overlays? > `optional` **player\_overlays**: [`PlayerOverlay`](../../YTNodes/classes/PlayerOverlay.md) -#### Defined in - -[src/parser/ytkids/VideoInfo.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytkids/VideoInfo.ts#L15) +Defined in: [src/parser/ytkids/VideoInfo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/VideoInfo.ts#L15) *** @@ -288,9 +276,7 @@ > `optional` **slim\_video\_metadata**: [`SlimVideoMetadata`](../../YTNodes/classes/SlimVideoMetadata.md) -#### Defined in - -[src/parser/ytkids/VideoInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytkids/VideoInfo.ts#L12) +Defined in: [src/parser/ytkids/VideoInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/VideoInfo.ts#L12) *** @@ -298,65 +284,63 @@ > `optional` **storyboards**: [`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md) \| [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md) +Defined in: [src/core/mixins/MediaInfo.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L41) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`storyboards`](../../Mixins/classes/MediaInfo.md#storyboards) -#### Defined in - -[src/core/mixins/MediaInfo.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L41) - *** ### streaming\_data? -> `optional` **streaming\_data**: [`IStreamingData`](../../APIResponseTypes/interfaces/IStreamingData.md) +> `optional` **streaming\_data**: [`IStreamingData`](../../../../interfaces/IStreamingData.md) + +Defined in: [src/core/mixins/MediaInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L45) #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`streaming_data`](../../Mixins/classes/MediaInfo.md#streaming_data) -#### Defined in - -[src/core/mixins/MediaInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L45) - *** ### watch\_next\_feed? > `optional` **watch\_next\_feed**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/ytkids/VideoInfo.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytkids/VideoInfo.ts#L13) +Defined in: [src/parser/ytkids/VideoInfo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytkids/VideoInfo.ts#L13) ## Accessors ### actions -> `get` **actions**(): [`Actions`](../../../classes/Actions.md) +#### Get Signature -#### Returns +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) -[`Actions`](../../../classes/Actions.md) +Defined in: [src/core/mixins/MediaInfo.ts:247](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L247) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`actions`](../../Mixins/classes/MediaInfo.md#actions) -#### Defined in - -[src/core/mixins/MediaInfo.ts:247](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L247) - *** ### cpn -> `get` **cpn**(): `string` +#### Get Signature + +> **get** **cpn**(): `string` + +Defined in: [src/core/mixins/MediaInfo.ts:254](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L254) Content Playback Nonce. -#### Returns +##### Returns `string` @@ -364,43 +348,47 @@ Content Playback Nonce. [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`cpn`](../../Mixins/classes/MediaInfo.md#cpn) -#### Defined in - -[src/core/mixins/MediaInfo.ts:254](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L254) - *** ### page -> `get` **page**(): [[`IPlayerResponse`](../../APIResponseTypes/type-aliases/IPlayerResponse.md), `INextResponse?`] +#### Get Signature + +> **get** **page**(): \[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] + +Defined in: [src/core/mixins/MediaInfo.ts:261](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L261) Parsed InnerTube response. -#### Returns +##### Returns -[[`IPlayerResponse`](../../APIResponseTypes/type-aliases/IPlayerResponse.md), `INextResponse?`] +\[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`page`](../../Mixins/classes/MediaInfo.md#page) -#### Defined in - -[src/core/mixins/MediaInfo.ts:261](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L261) - ## Methods ### addToWatchHistory() -> **addToWatchHistory**(`client_name`?, `client_version`?, `replacement`?): `Promise`\<`Response`\> +> **addToWatchHistory**(`client_name?`, `client_version?`, `replacement?`): `Promise`\<`Response`\> + +Defined in: [src/core/mixins/MediaInfo.ts:208](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L208) #### Parameters -• **client\_name?**: `string` +##### client\_name? -• **client\_version?**: `string` +`string` -• **replacement?**: `string` = `'https://www.'` +##### client\_version? + +`string` + +##### replacement? + +`string` = `'https://www.'` #### Returns @@ -410,21 +398,21 @@ Parsed InnerTube response. [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`addToWatchHistory`](../../Mixins/classes/MediaInfo.md#addtowatchhistory) -#### Defined in - -[src/core/mixins/MediaInfo.ts:208](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L208) - *** ### chooseFormat() > **chooseFormat**(`options`): [`Format`](../../Misc/classes/Format.md) +Defined in: [src/core/mixins/MediaInfo.ts:161](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L161) + Selects the format that best matches the given options. #### Parameters -• **options**: [`FormatOptions`](../../Types/interfaces/FormatOptions.md) +##### options + +[`FormatOptions`](../../Types/interfaces/FormatOptions.md) Options @@ -436,21 +424,21 @@ Options [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`chooseFormat`](../../Mixins/classes/MediaInfo.md#chooseformat) -#### Defined in - -[src/core/mixins/MediaInfo.ts:161](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L161) - *** ### download() > **download**(`options`): `Promise`\<`ReadableStream`\<`Uint8Array`\>\> +Defined in: [src/core/mixins/MediaInfo.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L169) + Downloads the video. #### Parameters -• **options**: [`DownloadOptions`](../../Types/interfaces/DownloadOptions.md) = `{}` +##### options + +[`DownloadOptions`](../../Types/interfaces/DownloadOptions.md) = `{}` Download options. @@ -462,23 +450,25 @@ Download options. [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`download`](../../Mixins/classes/MediaInfo.md#download) -#### Defined in - -[src/core/mixins/MediaInfo.ts:169](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L169) - *** ### getStreamingInfo() -> **getStreamingInfo**(`url_transformer`?, `format_filter`?): `Promise`\<`StreamingInfo`\> +> **getStreamingInfo**(`url_transformer?`, `format_filter?`): `Promise`\<`StreamingInfo`\> + +Defined in: [src/core/mixins/MediaInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L144) Get a cleaned up representation of the adaptive_formats #### Parameters -• **url\_transformer?**: [`URLTransformer`](../../Types/type-aliases/URLTransformer.md) +##### url\_transformer? -• **format\_filter?**: [`FormatFilter`](../../Types/type-aliases/FormatFilter.md) +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) + +##### format\_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) #### Returns @@ -488,16 +478,14 @@ Get a cleaned up representation of the adaptive_formats [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`getStreamingInfo`](../../Mixins/classes/MediaInfo.md#getstreaminginfo) -#### Defined in - -[src/core/mixins/MediaInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L144) - *** ### getTranscript() > **getTranscript**(): `Promise`\<[`TranscriptInfo`](../../YT/classes/TranscriptInfo.md)\> +Defined in: [src/core/mixins/MediaInfo.ts:182](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L182) + Retrieves the video's transcript. #### Returns @@ -508,27 +496,31 @@ Retrieves the video's transcript. [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`getTranscript`](../../Mixins/classes/MediaInfo.md#gettranscript) -#### Defined in - -[src/core/mixins/MediaInfo.ts:182](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L182) - *** ### toDash() > **toDash**(`options`): `Promise`\<`string`\> +Defined in: [src/core/mixins/MediaInfo.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L104) + Generates a DASH manifest from the streaming data. #### Parameters -• **options** = `{}` +##### options -• **options.format\_filter?**: [`FormatFilter`](../../Types/type-aliases/FormatFilter.md) +###### format_filter? -• **options.manifest\_options?**: `DashOptions` +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) -• **options.url\_transformer?**: [`URLTransformer`](../../Types/type-aliases/URLTransformer.md) +###### manifest_options? + +`DashOptions` + +###### url_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) #### Returns @@ -540,25 +532,31 @@ DASH manifest [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`toDash`](../../Mixins/classes/MediaInfo.md#todash) -#### Defined in - -[src/core/mixins/MediaInfo.ts:104](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L104) - *** ### updateWatchTime() > **updateWatchTime**(`startTime`, `client_name`, `client_version`, `replacement`): `Promise`\<`Response`\> +Defined in: [src/core/mixins/MediaInfo.ts:227](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L227) + #### Parameters -• **startTime**: `number` +##### startTime -• **client\_name**: `string` = `Constants.CLIENTS.WEB.NAME` +`number` -• **client\_version**: `string` = `Constants.CLIENTS.WEB.VERSION` +##### client\_name -• **replacement**: `string` = `'https://www.'` +`string` = `Constants.CLIENTS.WEB.NAME` + +##### client\_version + +`string` = `Constants.CLIENTS.WEB.VERSION` + +##### replacement + +`string` = `'https://www.'` #### Returns @@ -567,7 +565,3 @@ DASH manifest #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`updateWatchTime`](../../Mixins/classes/MediaInfo.md#updatewatchtime) - -#### Defined in - -[src/core/mixins/MediaInfo.ts:227](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L227) diff --git a/docs/api/namespaces/YTMusic/README.md b/docs/api/youtubei.js/namespaces/YTMusic/README.md similarity index 84% rename from docs/api/namespaces/YTMusic/README.md rename to docs/api/youtubei.js/namespaces/YTMusic/README.md index 40e3c5ac..5bcfa3e8 100644 --- a/docs/api/namespaces/YTMusic/README.md +++ b/docs/api/youtubei.js/namespaces/YTMusic/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / YTMusic +[youtubei.js](../../../README.md) / YTMusic # YTMusic -## Index - -### Classes +## Classes - [Album](classes/Album.md) - [Artist](classes/Artist.md) diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/Album.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/Album.md new file mode 100644 index 00000000..d5968ec7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/Album.md @@ -0,0 +1,77 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / Album + +# Class: Album + +Defined in: [src/parser/ytmusic/Album.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Album.ts#L15) + +## Constructors + +### Constructor + +> **new Album**(`response`): `Album` + +Defined in: [src/parser/ytmusic/Album.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Album.ts#L24) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +#### Returns + +`Album` + +## Properties + +### background? + +> `optional` **background**: [`MusicThumbnail`](../../YTNodes/classes/MusicThumbnail.md) + +Defined in: [src/parser/ytmusic/Album.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Album.ts#L21) + +*** + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicResponsiveListItem`](../../YTNodes/classes/MusicResponsiveListItem.md)\> + +Defined in: [src/parser/ytmusic/Album.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Album.ts#L19) + +*** + +### header? + +> `optional` **header**: [`MusicDetailHeader`](../../YTNodes/classes/MusicDetailHeader.md) \| [`MusicResponsiveHeader`](../../YTNodes/classes/MusicResponsiveHeader.md) + +Defined in: [src/parser/ytmusic/Album.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Album.ts#L18) + +*** + +### sections + +> **sections**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md)\> + +Defined in: [src/parser/ytmusic/Album.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Album.ts#L20) + +*** + +### url? + +> `optional` **url**: `string` + +Defined in: [src/parser/ytmusic/Album.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Album.ts#L22) + +## Accessors + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/ytmusic/Album.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Album.ts#L37) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/Artist.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/Artist.md new file mode 100644 index 00000000..d6bfde9f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/Artist.md @@ -0,0 +1,69 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / Artist + +# Class: Artist + +Defined in: [src/parser/ytmusic/Artist.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Artist.ts#L16) + +## Constructors + +### Constructor + +> **new Artist**(`response`, `actions`): `Artist` + +Defined in: [src/parser/ytmusic/Artist.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Artist.ts#L23) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`Artist` + +## Properties + +### header? + +> `optional` **header**: [`MusicImmersiveHeader`](../../YTNodes/classes/MusicImmersiveHeader.md) \| [`MusicVisualHeader`](../../YTNodes/classes/MusicVisualHeader.md) \| [`MusicHeader`](../../YTNodes/classes/MusicHeader.md) + +Defined in: [src/parser/ytmusic/Artist.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Artist.ts#L20) + +*** + +### sections + +> **sections**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md) \| [`MusicShelf`](../../YTNodes/classes/MusicShelf.md)\> + +Defined in: [src/parser/ytmusic/Artist.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Artist.ts#L21) + +## Accessors + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/ytmusic/Artist.ts:53](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Artist.ts#L53) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +## Methods + +### getAllSongs() + +> **getAllSongs**(): `Promise`\<[`MusicPlaylistShelf`](../../YTNodes/classes/MusicPlaylistShelf.md) \| `undefined`\> + +Defined in: [src/parser/ytmusic/Artist.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Artist.ts#L35) + +#### Returns + +`Promise`\<[`MusicPlaylistShelf`](../../YTNodes/classes/MusicPlaylistShelf.md) \| `undefined`\> diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/Explore.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/Explore.md new file mode 100644 index 00000000..1195b51a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/Explore.md @@ -0,0 +1,53 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / Explore + +# Class: Explore + +Defined in: [src/parser/ytmusic/Explore.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Explore.ts#L14) + +## Constructors + +### Constructor + +> **new Explore**(`response`): `Explore` + +Defined in: [src/parser/ytmusic/Explore.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Explore.ts#L20) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +#### Returns + +`Explore` + +## Properties + +### sections + +> **sections**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md)\> + +Defined in: [src/parser/ytmusic/Explore.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Explore.ts#L18) + +*** + +### top\_buttons + +> **top\_buttons**: [`MusicNavigationButton`](../../YTNodes/classes/MusicNavigationButton.md)[] + +Defined in: [src/parser/ytmusic/Explore.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Explore.ts#L17) + +## Accessors + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/ytmusic/Explore.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Explore.ts#L37) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/HomeFeed.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/HomeFeed.md new file mode 100644 index 00000000..14bbc72f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/HomeFeed.md @@ -0,0 +1,117 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / HomeFeed + +# Class: HomeFeed + +Defined in: [src/parser/ytmusic/HomeFeed.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L14) + +## Constructors + +### Constructor + +> **new HomeFeed**(`response`, `actions`): `HomeFeed` + +Defined in: [src/parser/ytmusic/HomeFeed.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L22) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`HomeFeed` + +## Properties + +### header? + +> `optional` **header**: [`ChipCloud`](../../YTNodes/classes/ChipCloud.md) + +Defined in: [src/parser/ytmusic/HomeFeed.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L20) + +*** + +### sections? + +> `optional` **sections**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md) \| [`MusicTastebuilderShelf`](../../YTNodes/classes/MusicTastebuilderShelf.md)\> + +Defined in: [src/parser/ytmusic/HomeFeed.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L19) + +## Accessors + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/parser/ytmusic/HomeFeed.ts:84](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L84) + +##### Returns + +`string`[] + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/ytmusic/HomeFeed.ts:88](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L88) + +##### Returns + +`boolean` + +*** + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/ytmusic/HomeFeed.ts:92](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L92) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +## Methods + +### applyFilter() + +> **applyFilter**(`target_filter`): `Promise`\<`HomeFeed`\> + +Defined in: [src/parser/ytmusic/HomeFeed.ts:61](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L61) + +#### Parameters + +##### target\_filter + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<`HomeFeed`\> + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<`HomeFeed`\> + +Defined in: [src/parser/ytmusic/HomeFeed.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/HomeFeed.ts#L49) + +Retrieves home feed continuation. + +#### Returns + +`Promise`\<`HomeFeed`\> diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/Library.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/Library.md new file mode 100644 index 00000000..107af790 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/Library.md @@ -0,0 +1,153 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / Library + +# Class: Library + +Defined in: [src/parser/ytmusic/Library.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L21) + +## Constructors + +### Constructor + +> **new Library**(`response`, `actions`): `Library` + +Defined in: [src/parser/ytmusic/Library.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L29) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`Library` + +## Properties + +### contents? + +> `optional` **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| [`Grid`](../../YTNodes/classes/Grid.md)\> + +Defined in: [src/parser/ytmusic/Library.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L27) + +*** + +### header? + +> `optional` **header**: [`MusicSideAlignedItem`](../../YTNodes/classes/MusicSideAlignedItem.md) + +Defined in: [src/parser/ytmusic/Library.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L26) + +## Accessors + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/parser/ytmusic/Library.ts:142](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L142) + +##### Returns + +`string`[] + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/ytmusic/Library.ts:132](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L132) + +##### Returns + +`boolean` + +*** + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/ytmusic/Library.ts:146](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L146) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +*** + +### sort\_options + +#### Get Signature + +> **get** **sort\_options**(): `string`[] + +Defined in: [src/parser/ytmusic/Library.ts:136](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L136) + +##### Returns + +`string`[] + +## Methods + +### applyFilter() + +> **applyFilter**(`filter`): `Promise`\<`Library`\> + +Defined in: [src/parser/ytmusic/Library.ts:94](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L94) + +Applies given filter to the library. + +#### Parameters + +##### filter + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<`Library`\> + +*** + +### applySort() + +> **applySort**(`sort_by`): `Promise`\<`Library`\> + +Defined in: [src/parser/ytmusic/Library.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L44) + +Applies given sort option to the library items. + +#### Parameters + +##### sort\_by + +`string` | [`MusicMultiSelectMenuItem`](../../YTNodes/classes/MusicMultiSelectMenuItem.md) + +#### Returns + +`Promise`\<`Library`\> + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<[`LibraryContinuation`](LibraryContinuation.md)\> + +Defined in: [src/parser/ytmusic/Library.ts:120](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L120) + +Retrieves continuation of the library items. + +#### Returns + +`Promise`\<[`LibraryContinuation`](LibraryContinuation.md)\> diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/LibraryContinuation.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/LibraryContinuation.md new file mode 100644 index 00000000..ae024cce --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/LibraryContinuation.md @@ -0,0 +1,75 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / LibraryContinuation + +# Class: LibraryContinuation + +Defined in: [src/parser/ytmusic/Library.ts:151](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L151) + +## Constructors + +### Constructor + +> **new LibraryContinuation**(`response`, `actions`): `LibraryContinuation` + +Defined in: [src/parser/ytmusic/Library.ts:158](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L158) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`LibraryContinuation` + +## Properties + +### contents + +> **contents**: [`MusicShelfContinuation`](../../../../classes/MusicShelfContinuation.md) \| [`GridContinuation`](../../../../classes/GridContinuation.md) + +Defined in: [src/parser/ytmusic/Library.ts:156](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L156) + +## Accessors + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/ytmusic/Library.ts:182](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L182) + +##### Returns + +`boolean` + +*** + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/ytmusic/Library.ts:186](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L186) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`LibraryContinuation`\> + +Defined in: [src/parser/ytmusic/Library.ts:170](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Library.ts#L170) + +#### Returns + +`Promise`\<`LibraryContinuation`\> diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/Playlist.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/Playlist.md new file mode 100644 index 00000000..5a3cb205 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/Playlist.md @@ -0,0 +1,139 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / Playlist + +# Class: Playlist + +Defined in: [src/parser/ytmusic/Playlist.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L22) + +## Constructors + +### Constructor + +> **new Playlist**(`response`, `actions`): `Playlist` + +Defined in: [src/parser/ytmusic/Playlist.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L34) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`Playlist` + +## Properties + +### background? + +> `optional` **background**: [`MusicThumbnail`](../../YTNodes/classes/MusicThumbnail.md) + +Defined in: [src/parser/ytmusic/Playlist.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L29) + +*** + +### contents? + +> `optional` **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ContinuationItem`](../../YTNodes/classes/ContinuationItem.md) \| [`MusicResponsiveListItem`](../../YTNodes/classes/MusicResponsiveListItem.md)\> + +Defined in: [src/parser/ytmusic/Playlist.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L28) + +*** + +### header? + +> `optional` **header**: [`MusicDetailHeader`](../../YTNodes/classes/MusicDetailHeader.md) \| [`MusicResponsiveHeader`](../../YTNodes/classes/MusicResponsiveHeader.md) \| [`MusicEditablePlaylistDetailHeader`](../../YTNodes/classes/MusicEditablePlaylistDetailHeader.md) + +Defined in: [src/parser/ytmusic/Playlist.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L27) + +## Accessors + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/ytmusic/Playlist.ts:163](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L163) + +##### Returns + +`boolean` + +*** + +### items + +#### Get Signature + +> **get** **items**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ContinuationItem`](../../YTNodes/classes/ContinuationItem.md) \| [`MusicResponsiveListItem`](../../YTNodes/classes/MusicResponsiveListItem.md)\> + +Defined in: [src/parser/ytmusic/Playlist.ts:159](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L159) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ContinuationItem`](../../YTNodes/classes/ContinuationItem.md) \| [`MusicResponsiveListItem`](../../YTNodes/classes/MusicResponsiveListItem.md)\> + +*** + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/ytmusic/Playlist.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L155) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +## Methods + +### getContinuation() + +> **getContinuation**(): `Promise`\<`Playlist`\> + +Defined in: [src/parser/ytmusic/Playlist.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L64) + +Retrieves playlist items continuation. + +#### Returns + +`Promise`\<`Playlist`\> + +*** + +### getRelated() + +> **getRelated**(): `Promise`\<[`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md)\> + +Defined in: [src/parser/ytmusic/Playlist.ts:85](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L85) + +Retrieves related playlists + +#### Returns + +`Promise`\<[`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md)\> + +*** + +### getSuggestions() + +> **getSuggestions**(`refresh`): `Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicResponsiveListItem`](../../YTNodes/classes/MusicResponsiveListItem.md)\>\> + +Defined in: [src/parser/ytmusic/Playlist.ts:114](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Playlist.ts#L114) + +#### Parameters + +##### refresh + +`boolean` = `true` + +#### Returns + +`Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicResponsiveListItem`](../../YTNodes/classes/MusicResponsiveListItem.md)\>\> diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/Recap.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/Recap.md new file mode 100644 index 00000000..032d5ea3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/Recap.md @@ -0,0 +1,71 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / Recap + +# Class: Recap + +Defined in: [src/parser/ytmusic/Recap.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Recap.ts#L19) + +## Constructors + +### Constructor + +> **new Recap**(`response`, `actions`): `Recap` + +Defined in: [src/parser/ytmusic/Recap.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Recap.ts#L26) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`Recap` + +## Properties + +### header? + +> `optional` **header**: [`MusicHeader`](../../YTNodes/classes/MusicHeader.md) \| [`HighlightsCarousel`](../../YTNodes/classes/HighlightsCarousel.md) + +Defined in: [src/parser/ytmusic/Recap.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Recap.ts#L23) + +*** + +### sections? + +> `optional` **sections**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ItemSection`](../../YTNodes/classes/ItemSection.md) \| [`Message`](../../YTNodes/classes/Message.md) \| [`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md)\> + +Defined in: [src/parser/ytmusic/Recap.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Recap.ts#L24) + +## Accessors + +### page + +#### Get Signature + +> **get** **page**(): [`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +Defined in: [src/parser/ytmusic/Recap.ts:60](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Recap.ts#L60) + +##### Returns + +[`IBrowseResponse`](../../../../type-aliases/IBrowseResponse.md) + +## Methods + +### getPlaylist() + +> **getPlaylist**(): `Promise`\<[`Playlist`](Playlist.md)\> + +Defined in: [src/parser/ytmusic/Recap.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Recap.ts#L47) + +Retrieves recap playlist. + +#### Returns + +`Promise`\<[`Playlist`](Playlist.md)\> diff --git a/docs/api/youtubei.js/namespaces/YTMusic/classes/Search.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/Search.md new file mode 100644 index 00000000..f62a90a8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/Search.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / Search + +# Class: Search + +Defined in: [src/parser/ytmusic/Search.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L20) + +## Constructors + +### Constructor + +> **new Search**(`response`, `actions`, `is_filtered?`): `Search` + +Defined in: [src/parser/ytmusic/Search.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L28) + +#### Parameters + +##### response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### is\_filtered? + +`boolean` + +#### Returns + +`Search` + +## Properties + +### contents? + +> `optional` **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ItemSection`](../../YTNodes/classes/ItemSection.md) \| [`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| [`MusicCardShelf`](../../YTNodes/classes/MusicCardShelf.md)\> + +Defined in: [src/parser/ytmusic/Search.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L26) + +*** + +### header? + +> `optional` **header**: [`ChipCloud`](../../YTNodes/classes/ChipCloud.md) + +Defined in: [src/parser/ytmusic/Search.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L25) + +## Accessors + +### albums + +#### Get Signature + +> **get** **albums**(): [`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +Defined in: [src/parser/ytmusic/Search.ts:137](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L137) + +##### Returns + +[`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +*** + +### artists + +#### Get Signature + +> **get** **artists**(): [`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +Defined in: [src/parser/ytmusic/Search.ts:141](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L141) + +##### Returns + +[`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +*** + +### did\_you\_mean + +#### Get Signature + +> **get** **did\_you\_mean**(): [`DidYouMean`](../../YTNodes/classes/DidYouMean.md) \| `undefined` + +Defined in: [src/parser/ytmusic/Search.ts:117](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L117) + +##### Returns + +[`DidYouMean`](../../YTNodes/classes/DidYouMean.md) \| `undefined` + +*** + +### filters + +#### Get Signature + +> **get** **filters**(): `string`[] + +Defined in: [src/parser/ytmusic/Search.ts:109](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L109) + +##### Returns + +`string`[] + +*** + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/ytmusic/Search.ts:113](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L113) + +##### Returns + +`boolean` + +*** + +### message + +#### Get Signature + +> **get** **message**(): [`Message`](../../YTNodes/classes/Message.md) \| `undefined` + +Defined in: [src/parser/ytmusic/Search.ts:125](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L125) + +##### Returns + +[`Message`](../../YTNodes/classes/Message.md) \| `undefined` + +*** + +### page + +#### Get Signature + +> **get** **page**(): [`ISearchResponse`](../../../../type-aliases/ISearchResponse.md) + +Defined in: [src/parser/ytmusic/Search.ts:149](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L149) + +##### Returns + +[`ISearchResponse`](../../../../type-aliases/ISearchResponse.md) + +*** + +### playlists + +#### Get Signature + +> **get** **playlists**(): [`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +Defined in: [src/parser/ytmusic/Search.ts:145](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L145) + +##### Returns + +[`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +*** + +### showing\_results\_for + +#### Get Signature + +> **get** **showing\_results\_for**(): [`ShowingResultsFor`](../../YTNodes/classes/ShowingResultsFor.md) \| `undefined` + +Defined in: [src/parser/ytmusic/Search.ts:121](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L121) + +##### Returns + +[`ShowingResultsFor`](../../YTNodes/classes/ShowingResultsFor.md) \| `undefined` + +*** + +### songs + +#### Get Signature + +> **get** **songs**(): [`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +Defined in: [src/parser/ytmusic/Search.ts:129](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L129) + +##### Returns + +[`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +*** + +### videos + +#### Get Signature + +> **get** **videos**(): [`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +Defined in: [src/parser/ytmusic/Search.ts:133](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L133) + +##### Returns + +[`MusicShelf`](../../YTNodes/classes/MusicShelf.md) \| `undefined` + +## Methods + +### applyFilter() + +> **applyFilter**(`target_filter`): `Promise`\<`Search`\> + +Defined in: [src/parser/ytmusic/Search.ts:86](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L86) + +Applies given filter to the search. + +#### Parameters + +##### target\_filter + +`string` | [`ChipCloudChip`](../../YTNodes/classes/ChipCloudChip.md) + +#### Returns + +`Promise`\<`Search`\> + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<`SearchContinuation`\> + +Defined in: [src/parser/ytmusic/Search.ts:71](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L71) + +Retrieves search continuation. Only available for filtered searches and shelf continuations. + +#### Returns + +`Promise`\<`SearchContinuation`\> + +*** + +### getMore() + +> **getMore**(`shelf`): `Promise`\<`Search`\> + +Defined in: [src/parser/ytmusic/Search.ts:56](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/Search.ts#L56) + +Loads more items for the given shelf. + +#### Parameters + +##### shelf + +[`MusicShelf`](../../YTNodes/classes/MusicShelf.md) | `undefined` + +#### Returns + +`Promise`\<`Search`\> diff --git a/docs/api/namespaces/YTMusic/classes/TrackInfo.md b/docs/api/youtubei.js/namespaces/YTMusic/classes/TrackInfo.md similarity index 52% rename from docs/api/namespaces/YTMusic/classes/TrackInfo.md rename to docs/api/youtubei.js/namespaces/YTMusic/classes/TrackInfo.md index ac06e338..c37028a1 100644 --- a/docs/api/namespaces/YTMusic/classes/TrackInfo.md +++ b/docs/api/youtubei.js/namespaces/YTMusic/classes/TrackInfo.md @@ -1,36 +1,42 @@ -[youtubei.js](../../../README.md) / [YTMusic](../README.md) / TrackInfo +[youtubei.js](../../../../README.md) / [YTMusic](../README.md) / TrackInfo # Class: TrackInfo +Defined in: [src/parser/ytmusic/TrackInfo.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L22) + ## Extends - [`MediaInfo`](../../Mixins/classes/MediaInfo.md) ## Constructors -### new TrackInfo() +### Constructor -> **new TrackInfo**(`data`, `actions`, `cpn`): [`TrackInfo`](TrackInfo.md) +> **new TrackInfo**(`data`, `actions`, `cpn`): `TrackInfo` + +Defined in: [src/parser/ytmusic/TrackInfo.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L27) #### Parameters -• **data**: [[`ApiResponse`](../../../interfaces/ApiResponse.md), `ApiResponse?`] +##### data -• **actions**: [`Actions`](../../../classes/Actions.md) +\[[`ApiResponse`](../../../../interfaces/ApiResponse.md), [`ApiResponse`](../../../../interfaces/ApiResponse.md)?\] -• **cpn**: `string` +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### cpn + +`string` #### Returns -[`TrackInfo`](TrackInfo.md) +`TrackInfo` #### Overrides -[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`constructor`](../../Mixins/classes/MediaInfo.md#constructors) - -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:27](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L27) +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`constructor`](../../Mixins/classes/MediaInfo.md#constructor) ## Properties @@ -38,20 +44,20 @@ > `optional` **annotations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlayerAnnotationsExpanded`](../../YTNodes/classes/PlayerAnnotationsExpanded.md)\> +Defined in: [src/core/mixins/MediaInfo.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L40) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`annotations`](../../Mixins/classes/MediaInfo.md#annotations) -#### Defined in - -[src/core/mixins/MediaInfo.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L40) - *** ### basic\_info > **basic\_info**: `object` +Defined in: [src/core/mixins/MediaInfo.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L39) + #### allow\_ratings? > `optional` **allow\_ratings**: `boolean` @@ -62,11 +68,11 @@ #### category -> **category**: `null` \| `string` +> **category**: `string` \| `null` #### channel -> **channel**: `null` \| `object` +> **channel**: \{ `id`: `string`; `name`: `string`; `url`: `string`; \} \| `null` #### channel\_id? @@ -78,15 +84,15 @@ #### embed -> **embed**: `undefined` \| `null` \| `object` +> **embed**: \{ `flash_secure_url`: `string`; `flash_url`: `string`; `height`: `any`; `iframe_url`: `string`; `width`: `any`; \} \| `null` \| `undefined` #### end\_timestamp -> **end\_timestamp**: `null` \| `Date` +> **end\_timestamp**: `Date` \| `null` #### has\_ypc\_metadata -> **has\_ypc\_metadata**: `null` \| `boolean` +> **has\_ypc\_metadata**: `boolean` \| `null` #### id? @@ -98,15 +104,15 @@ #### is\_disliked -> **is\_disliked**: `undefined` \| `boolean` +> **is\_disliked**: `boolean` \| `undefined` #### is\_family\_safe -> **is\_family\_safe**: `undefined` \| `boolean` = `info.microformat.is_family_safe` +> **is\_family\_safe**: `boolean` \| `undefined` = `info.microformat.is_family_safe` #### is\_liked -> **is\_liked**: `undefined` \| `boolean` +> **is\_liked**: `boolean` \| `undefined` #### is\_live? @@ -138,7 +144,7 @@ #### is\_unlisted -> **is\_unlisted**: `undefined` \| `boolean` = `info.microformat.is_unlisted` +> **is\_unlisted**: `boolean` \| `undefined` = `info.microformat.is_unlisted` #### is\_upcoming? @@ -150,7 +156,7 @@ #### like\_count -> **like\_count**: `undefined` \| `number` +> **like\_count**: `number` \| `undefined` #### live\_chunk\_readahead? @@ -162,11 +168,11 @@ #### start\_timestamp -> **start\_timestamp**: `null` \| `Date` +> **start\_timestamp**: `Date` \| `null` #### tags -> **tags**: `null` \| `string`[] +> **tags**: `string`[] \| `null` #### thumbnail? @@ -178,57 +184,47 @@ #### url\_canonical -> **url\_canonical**: `null` \| `string` +> **url\_canonical**: `string` \| `null` #### view\_count -> **view\_count**: `undefined` \| `number` +> **view\_count**: `number` \| `undefined` #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`basic_info`](../../Mixins/classes/MediaInfo.md#basic_info) -#### Defined in - -[src/core/mixins/MediaInfo.ts:39](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L39) - *** ### captions? > `optional` **captions**: [`PlayerCaptionsTracklist`](../../YTNodes/classes/PlayerCaptionsTracklist.md) +Defined in: [src/core/mixins/MediaInfo.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L43) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`captions`](../../Mixins/classes/MediaInfo.md#captions) -#### Defined in - -[src/core/mixins/MediaInfo.ts:43](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L43) - *** ### cards? > `optional` **cards**: [`CardCollection`](../../YTNodes/classes/CardCollection.md) +Defined in: [src/core/mixins/MediaInfo.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L44) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`cards`](../../Mixins/classes/MediaInfo.md#cards) -#### Defined in - -[src/core/mixins/MediaInfo.ts:44](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L44) - *** ### current\_video\_endpoint? > `optional` **current\_video\_endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:24](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L24) +Defined in: [src/parser/ytmusic/TrackInfo.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L24) *** @@ -236,51 +232,43 @@ > `optional` **endscreen**: [`Endscreen`](../../YTNodes/classes/Endscreen.md) +Defined in: [src/core/mixins/MediaInfo.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L42) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`endscreen`](../../Mixins/classes/MediaInfo.md#endscreen) -#### Defined in - -[src/core/mixins/MediaInfo.ts:42](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L42) - *** ### playability\_status? -> `optional` **playability\_status**: [`IPlayabilityStatus`](../../APIResponseTypes/interfaces/IPlayabilityStatus.md) +> `optional` **playability\_status**: [`IPlayabilityStatus`](../../../../interfaces/IPlayabilityStatus.md) + +Defined in: [src/core/mixins/MediaInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L46) #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`playability_status`](../../Mixins/classes/MediaInfo.md#playability_status) -#### Defined in - -[src/core/mixins/MediaInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L46) - *** ### player\_config? -> `optional` **player\_config**: [`IPlayerConfig`](../../APIResponseTypes/interfaces/IPlayerConfig.md) +> `optional` **player\_config**: [`IPlayerConfig`](../../../../interfaces/IPlayerConfig.md) + +Defined in: [src/core/mixins/MediaInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L47) #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`player_config`](../../Mixins/classes/MediaInfo.md#player_config) -#### Defined in - -[src/core/mixins/MediaInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L47) - *** ### player\_overlays? > `optional` **player\_overlays**: [`PlayerOverlay`](../../YTNodes/classes/PlayerOverlay.md) -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:25](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L25) +Defined in: [src/parser/ytmusic/TrackInfo.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L25) *** @@ -288,79 +276,77 @@ > `optional` **storyboards**: [`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md) \| [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md) +Defined in: [src/core/mixins/MediaInfo.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L41) + #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`storyboards`](../../Mixins/classes/MediaInfo.md#storyboards) -#### Defined in - -[src/core/mixins/MediaInfo.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L41) - *** ### streaming\_data? -> `optional` **streaming\_data**: [`IStreamingData`](../../APIResponseTypes/interfaces/IStreamingData.md) +> `optional` **streaming\_data**: [`IStreamingData`](../../../../interfaces/IStreamingData.md) + +Defined in: [src/core/mixins/MediaInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L45) #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`streaming_data`](../../Mixins/classes/MediaInfo.md#streaming_data) -#### Defined in - -[src/core/mixins/MediaInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L45) - *** ### tabs? > `optional` **tabs**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Tab`](../../YTNodes/classes/Tab.md)\> -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:23](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L23) +Defined in: [src/parser/ytmusic/TrackInfo.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L23) ## Accessors ### actions -> `get` **actions**(): [`Actions`](../../../classes/Actions.md) +#### Get Signature -#### Returns +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) -[`Actions`](../../../classes/Actions.md) +Defined in: [src/core/mixins/MediaInfo.ts:247](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L247) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`actions`](../../Mixins/classes/MediaInfo.md#actions) -#### Defined in - -[src/core/mixins/MediaInfo.ts:247](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L247) - *** ### available\_tabs -> `get` **available\_tabs**(): `string`[] +#### Get Signature -#### Returns +> **get** **available\_tabs**(): `string`[] + +Defined in: [src/parser/ytmusic/TrackInfo.ts:155](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L155) + +##### Returns `string`[] -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:155](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L155) - *** ### cpn -> `get` **cpn**(): `string` +#### Get Signature + +> **get** **cpn**(): `string` + +Defined in: [src/core/mixins/MediaInfo.ts:254](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L254) Content Playback Nonce. -#### Returns +##### Returns `string` @@ -368,36 +354,34 @@ Content Playback Nonce. [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`cpn`](../../Mixins/classes/MediaInfo.md#cpn) -#### Defined in - -[src/core/mixins/MediaInfo.ts:254](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L254) - *** ### page -> `get` **page**(): [[`IPlayerResponse`](../../APIResponseTypes/type-aliases/IPlayerResponse.md), `INextResponse?`] +#### Get Signature + +> **get** **page**(): \[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] + +Defined in: [src/core/mixins/MediaInfo.ts:261](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L261) Parsed InnerTube response. -#### Returns +##### Returns -[[`IPlayerResponse`](../../APIResponseTypes/type-aliases/IPlayerResponse.md), `INextResponse?`] +\[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] #### Inherited from [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`page`](../../Mixins/classes/MediaInfo.md#page) -#### Defined in - -[src/core/mixins/MediaInfo.ts:261](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L261) - ## Methods ### addToWatchHistory() > **addToWatchHistory**(): `Promise`\<`Response`\> +Defined in: [src/parser/ytmusic/TrackInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L144) + Adds the song to the watch history. #### Returns @@ -408,21 +392,21 @@ Adds the song to the watch history. [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`addToWatchHistory`](../../Mixins/classes/MediaInfo.md#addtowatchhistory) -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L144) - *** ### chooseFormat() > **chooseFormat**(`options`): [`Format`](../../Misc/classes/Format.md) +Defined in: [src/core/mixins/MediaInfo.ts:161](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L161) + Selects the format that best matches the given options. #### Parameters -• **options**: [`FormatOptions`](../../Types/interfaces/FormatOptions.md) +##### options + +[`FormatOptions`](../../Types/interfaces/FormatOptions.md) Options @@ -434,21 +418,21 @@ Options [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`chooseFormat`](../../Mixins/classes/MediaInfo.md#chooseformat) -#### Defined in - -[src/core/mixins/MediaInfo.ts:161](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L161) - *** ### download() > **download**(`options`): `Promise`\<`ReadableStream`\<`Uint8Array`\>\> +Defined in: [src/core/mixins/MediaInfo.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L169) + Downloads the video. #### Parameters -• **options**: [`DownloadOptions`](../../Types/interfaces/DownloadOptions.md) = `{}` +##### options + +[`DownloadOptions`](../../Types/interfaces/DownloadOptions.md) = `{}` Download options. @@ -460,25 +444,19 @@ Download options. [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`download`](../../Mixins/classes/MediaInfo.md#download) -#### Defined in - -[src/core/mixins/MediaInfo.ts:169](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L169) - *** ### getLyrics() -> **getLyrics**(): `Promise`\<`undefined` \| [`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md)\> +> **getLyrics**(): `Promise`\<[`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md) \| `undefined`\> + +Defined in: [src/parser/ytmusic/TrackInfo.ts:136](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L136) Retrieves lyrics. #### Returns -`Promise`\<`undefined` \| [`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md)\> - -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:136](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L136) +`Promise`\<[`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md) \| `undefined`\> *** @@ -486,29 +464,33 @@ Retrieves lyrics. > **getRelated**(): `Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md) \| [`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md)\>\> +Defined in: [src/parser/ytmusic/TrackInfo.ts:129](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L129) + Retrieves related content. #### Returns `Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicCarouselShelf`](../../YTNodes/classes/MusicCarouselShelf.md) \| [`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md)\>\> -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:129](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L129) - *** ### getStreamingInfo() -> **getStreamingInfo**(`url_transformer`?, `format_filter`?): `Promise`\<`StreamingInfo`\> +> **getStreamingInfo**(`url_transformer?`, `format_filter?`): `Promise`\<`StreamingInfo`\> + +Defined in: [src/core/mixins/MediaInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L144) Get a cleaned up representation of the adaptive_formats #### Parameters -• **url\_transformer?**: [`URLTransformer`](../../Types/type-aliases/URLTransformer.md) +##### url\_transformer? -• **format\_filter?**: [`FormatFilter`](../../Types/type-aliases/FormatFilter.md) +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) + +##### format\_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) #### Returns @@ -518,36 +500,34 @@ Get a cleaned up representation of the adaptive_formats [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`getStreamingInfo`](../../Mixins/classes/MediaInfo.md#getstreaminginfo) -#### Defined in - -[src/core/mixins/MediaInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L144) - *** ### getTab() > **getTab**(`title_or_page_type`): `Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> \| [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`Message`](../../YTNodes/classes/Message.md)\> +Defined in: [src/parser/ytmusic/TrackInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L46) + Retrieves contents of the given tab. #### Parameters -• **title\_or\_page\_type**: `string` +##### title\_or\_page\_type + +`string` #### Returns `Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> \| [`SectionList`](../../YTNodes/classes/SectionList.md) \| [`MusicQueue`](../../YTNodes/classes/MusicQueue.md) \| [`RichGrid`](../../YTNodes/classes/RichGrid.md) \| [`Message`](../../YTNodes/classes/Message.md)\> -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L46) - *** ### getTranscript() > **getTranscript**(): `Promise`\<[`TranscriptInfo`](../../YT/classes/TranscriptInfo.md)\> +Defined in: [src/core/mixins/MediaInfo.ts:182](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L182) + Retrieves the video's transcript. #### Returns @@ -558,49 +538,45 @@ Retrieves the video's transcript. [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`getTranscript`](../../Mixins/classes/MediaInfo.md#gettranscript) -#### Defined in - -[src/core/mixins/MediaInfo.ts:182](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L182) - *** ### getUpNext() > **getUpNext**(`automix`): `Promise`\<[`PlaylistPanel`](../../YTNodes/classes/PlaylistPanel.md)\> +Defined in: [src/parser/ytmusic/TrackInfo.ts:75](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L75) + Retrieves up next. #### Parameters -• **automix**: `boolean` = `true` +##### automix + +`boolean` = `true` #### Returns `Promise`\<[`PlaylistPanel`](../../YTNodes/classes/PlaylistPanel.md)\> -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:75](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L75) - *** ### getUpNextContinuation() -> **getUpNextContinuation**(`playlistPanel`): `Promise`\<[`PlaylistPanelContinuation`](../../../classes/PlaylistPanelContinuation.md)\> +> **getUpNextContinuation**(`playlistPanel`): `Promise`\<[`PlaylistPanelContinuation`](../../../../classes/PlaylistPanelContinuation.md)\> + +Defined in: [src/parser/ytmusic/TrackInfo.ts:107](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L107) Retrieves up next continuation relative to current TrackInfo. #### Parameters -• **playlistPanel**: [`PlaylistPanel`](../../YTNodes/classes/PlaylistPanel.md) \| [`PlaylistPanelContinuation`](../../../classes/PlaylistPanelContinuation.md) +##### playlistPanel + +[`PlaylistPanel`](../../YTNodes/classes/PlaylistPanel.md) | [`PlaylistPanelContinuation`](../../../../classes/PlaylistPanelContinuation.md) #### Returns -`Promise`\<[`PlaylistPanelContinuation`](../../../classes/PlaylistPanelContinuation.md)\> - -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:107](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L107) +`Promise`\<[`PlaylistPanelContinuation`](../../../../classes/PlaylistPanelContinuation.md)\> *** @@ -608,17 +584,25 @@ Retrieves up next continuation relative to current TrackInfo. > **toDash**(`options`): `Promise`\<`string`\> +Defined in: [src/core/mixins/MediaInfo.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L104) + Generates a DASH manifest from the streaming data. #### Parameters -• **options** = `{}` +##### options -• **options.format\_filter?**: [`FormatFilter`](../../Types/type-aliases/FormatFilter.md) +###### format_filter? -• **options.manifest\_options?**: `DashOptions` +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) -• **options.url\_transformer?**: [`URLTransformer`](../../Types/type-aliases/URLTransformer.md) +###### manifest_options? + +`DashOptions` + +###### url_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) #### Returns @@ -630,21 +614,21 @@ DASH manifest [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`toDash`](../../Mixins/classes/MediaInfo.md#todash) -#### Defined in - -[src/core/mixins/MediaInfo.ts:104](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/mixins/MediaInfo.ts#L104) - *** ### updateWatchTime() > **updateWatchTime**(`startTime`): `Promise`\<`Response`\> +Defined in: [src/parser/ytmusic/TrackInfo.ts:151](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytmusic/TrackInfo.ts#L151) + Updates the watch time of the song. #### Parameters -• **startTime**: `number` +##### startTime + +`number` #### Returns @@ -653,7 +637,3 @@ Updates the watch time of the song. #### Overrides [`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`updateWatchTime`](../../Mixins/classes/MediaInfo.md#updatewatchtime) - -#### Defined in - -[src/parser/ytmusic/TrackInfo.ts:151](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/ytmusic/TrackInfo.ts#L151) diff --git a/docs/api/namespaces/YTNodes/README.md b/docs/api/youtubei.js/namespaces/YTNodes/README.md similarity index 99% rename from docs/api/namespaces/YTNodes/README.md rename to docs/api/youtubei.js/namespaces/YTNodes/README.md index cee38a9e..e725b645 100644 --- a/docs/api/namespaces/YTNodes/README.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/README.md @@ -1,10 +1,8 @@ -[youtubei.js](../../README.md) / YTNodes +[youtubei.js](../../../README.md) / YTNodes # YTNodes -## Index - -### Classes +## Classes - [AboutChannel](classes/AboutChannel.md) - [AboutChannelView](classes/AboutChannelView.md) @@ -25,7 +23,6 @@ - [AlertWithButton](classes/AlertWithButton.md) - [AnchoredSection](classes/AnchoredSection.md) - [AnimatedThumbnailOverlayView](classes/AnimatedThumbnailOverlayView.md) -- [AppendContinuationItemsAction](classes/AppendContinuationItemsAction.md) - [AttributionView](classes/AttributionView.md) - [AudioOnlyPlayability](classes/AudioOnlyPlayability.md) - [AuthorCommentBadge](classes/AuthorCommentBadge.md) @@ -160,7 +157,9 @@ - [FeedNudge](classes/FeedNudge.md) - [FeedTabbedHeader](classes/FeedTabbedHeader.md) - [FlexibleActionsView](classes/FlexibleActionsView.md) +- [Form](classes/Form.md) - [FormFooterView](classes/FormFooterView.md) +- [FormPopup](classes/FormPopup.md) - [GameCard](classes/GameCard.md) - [GameDetails](classes/GameDetails.md) - [GetAccountsListInnertubeEndpoint](classes/GetAccountsListInnertubeEndpoint.md) @@ -546,3 +545,9 @@ - [WatchNextEndScreen](classes/WatchNextEndScreen.md) - [WatchNextTabbedResults](classes/WatchNextTabbedResults.md) - [YpcTrailer](classes/YpcTrailer.md) + +## References + +### AppendContinuationItemsAction + +Re-exports [AppendContinuationItemsAction](../../../classes/AppendContinuationItemsAction.md) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AboutChannel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AboutChannel.md new file mode 100644 index 00000000..72e53057 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AboutChannel.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AboutChannel + +# Class: AboutChannel + +Defined in: [src/parser/classes/AboutChannel.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannel.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AboutChannel**(`data`): `AboutChannel` + +Defined in: [src/parser/classes/AboutChannel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannel.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AboutChannel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### metadata + +> **metadata**: [`AboutChannelView`](AboutChannelView.md) \| `null` + +Defined in: [src/parser/classes/AboutChannel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannel.ts#L9) + +*** + +### share\_channel + +> **share\_channel**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/AboutChannel.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannel.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AboutChannel'` + +Defined in: [src/parser/classes/AboutChannel.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannel.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AboutChannel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AboutChannel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AboutChannelView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AboutChannelView.md new file mode 100644 index 00000000..8ce856d7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AboutChannelView.md @@ -0,0 +1,327 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AboutChannelView + +# Class: AboutChannelView + +Defined in: [src/parser/classes/AboutChannelView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AboutChannelView**(`data`): `AboutChannelView` + +Defined in: [src/parser/classes/AboutChannelView.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AboutChannelView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### additional\_info\_label? + +> `optional` **additional\_info\_label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AboutChannelView.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L20) + +*** + +### canonical\_channel\_url? + +> `optional` **canonical\_channel\_url**: `string` + +Defined in: [src/parser/classes/AboutChannelView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L18) + +*** + +### channel\_id? + +> `optional` **channel\_id**: `string` + +Defined in: [src/parser/classes/AboutChannelView.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L19) + +*** + +### country? + +> `optional` **country**: `string` + +Defined in: [src/parser/classes/AboutChannelView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L13) + +*** + +### custom\_links\_label? + +> `optional` **custom\_links\_label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AboutChannelView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L14) + +*** + +### custom\_url\_on\_tap? + +> `optional` **custom\_url\_on\_tap**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/AboutChannelView.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L21) + +*** + +### description? + +> `optional` **description**: `string` + +Defined in: [src/parser/classes/AboutChannelView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L11) + +*** + +### description\_label? + +> `optional` **description\_label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AboutChannelView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L12) + +*** + +### joined\_date? + +> `optional` **joined\_date**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AboutChannelView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L17) + +*** + +### links + +> **links**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChannelExternalLinkView`](ChannelExternalLinkView.md)\> + +Defined in: [src/parser/classes/AboutChannelView.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L24) + +*** + +### sign\_in\_for\_business\_email? + +> `optional` **sign\_in\_for\_business\_email**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AboutChannelView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L23) + +*** + +### subscriber\_count? + +> `optional` **subscriber\_count**: `string` + +Defined in: [src/parser/classes/AboutChannelView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count? + +> `optional` **video\_count**: `string` + +Defined in: [src/parser/classes/AboutChannelView.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L22) + +*** + +### view\_count? + +> `optional` **view\_count**: `string` + +Defined in: [src/parser/classes/AboutChannelView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L16) + +*** + +### type + +> `static` **type**: `string` = `'AboutChannelView'` + +Defined in: [src/parser/classes/AboutChannelView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AboutChannelView.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AboutChannelView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AboutChannelView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/AccountChannel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountChannel.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/AccountChannel.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AccountChannel.md index 2b1a2aeb..69b3ca46 100644 --- a/docs/api/namespaces/YTNodes/classes/AccountChannel.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountChannel.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AccountChannel +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AccountChannel # Class: AccountChannel +Defined in: [src/parser/classes/AccountChannel.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountChannel.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AccountChannel() +### Constructor -> **new AccountChannel**(`data`): [`AccountChannel`](AccountChannel.md) +> **new AccountChannel**(`data`): `AccountChannel` + +Defined in: [src/parser/classes/AccountChannel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountChannel.ts#L12) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AccountChannel`](AccountChannel.md) +`AccountChannel` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AccountChannel.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountChannel.ts#L12) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) -#### Defined in - -[src/parser/classes/AccountChannel.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountChannel.ts#L10) +Defined in: [src/parser/classes/AccountChannel.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountChannel.ts#L10) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/AccountChannel.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountChannel.ts#L9) +Defined in: [src/parser/classes/AccountChannel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountChannel.ts#L9) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AccountChannel'` +Defined in: [src/parser/classes/AccountChannel.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountChannel.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AccountChannel.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountChannel.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AccountChannel & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItem.md new file mode 100644 index 00000000..74821b5a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItem.md @@ -0,0 +1,281 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AccountItem + +# Class: AccountItem + +Defined in: [src/parser/classes/AccountItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L10) + +Not a real renderer but we treat it as one to keep things organized. + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AccountItem**(`data`): `AccountItem` + +Defined in: [src/parser/classes/AccountItem.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L22) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AccountItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### account\_byline + +> **account\_byline**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AccountItem.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L19) + +*** + +### account\_name + +> **account\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AccountItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L13) + +*** + +### account\_photo + +> **account\_photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/AccountItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L14) + +*** + +### channel\_handle + +> **channel\_handle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AccountItem.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L20) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/AccountItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L18) + +*** + +### has\_channel + +> **has\_channel**: `boolean` + +Defined in: [src/parser/classes/AccountItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L17) + +*** + +### is\_disabled + +> **is\_disabled**: `boolean` + +Defined in: [src/parser/classes/AccountItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L16) + +*** + +### is\_selected + +> **is\_selected**: `boolean` + +Defined in: [src/parser/classes/AccountItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AccountItem'` + +Defined in: [src/parser/classes/AccountItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItem.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AccountItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AccountItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItemSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItemSection.md new file mode 100644 index 00000000..4193543c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItemSection.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AccountItemSection + +# Class: AccountItemSection + +Defined in: [src/parser/classes/AccountItemSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSection.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AccountItemSection**(`data`): `AccountItemSection` + +Defined in: [src/parser/classes/AccountItemSection.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSection.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AccountItemSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactLink`](CompactLink.md) \| [`AccountItem`](AccountItem.md)\> + +Defined in: [src/parser/classes/AccountItemSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSection.ts#L11) + +*** + +### header + +> **header**: [`AccountItemSectionHeader`](AccountItemSectionHeader.md) \| `null` + +Defined in: [src/parser/classes/AccountItemSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSection.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AccountItemSection'` + +Defined in: [src/parser/classes/AccountItemSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSection.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AccountItemSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AccountItemSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/AccountItemSectionHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItemSectionHeader.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/AccountItemSectionHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItemSectionHeader.md index 7c227de1..5a1d8b33 100644 --- a/docs/api/namespaces/YTNodes/classes/AccountItemSectionHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountItemSectionHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AccountItemSectionHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AccountItemSectionHeader # Class: AccountItemSectionHeader +Defined in: [src/parser/classes/AccountItemSectionHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSectionHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AccountItemSectionHeader() +### Constructor -> **new AccountItemSectionHeader**(`data`): [`AccountItemSectionHeader`](AccountItemSectionHeader.md) +> **new AccountItemSectionHeader**(`data`): `AccountItemSectionHeader` + +Defined in: [src/parser/classes/AccountItemSectionHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSectionHeader.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AccountItemSectionHeader`](AccountItemSectionHeader.md) +`AccountItemSectionHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AccountItemSectionHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountItemSectionHeader.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/AccountItemSectionHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountItemSectionHeader.ts#L8) +Defined in: [src/parser/classes/AccountItemSectionHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSectionHeader.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AccountItemSectionHeader'` +Defined in: [src/parser/classes/AccountItemSectionHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountItemSectionHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AccountItemSectionHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountItemSectionHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AccountItemSectionHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/AccountSectionList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountSectionList.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/AccountSectionList.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AccountSectionList.md index a115343d..da9694a8 100644 --- a/docs/api/namespaces/YTNodes/classes/AccountSectionList.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AccountSectionList.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AccountSectionList +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AccountSectionList # Class: AccountSectionList +Defined in: [src/parser/classes/AccountSectionList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountSectionList.ts#L9) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AccountSectionList() +### Constructor -> **new AccountSectionList**(`data`): [`AccountSectionList`](AccountSectionList.md) +> **new AccountSectionList**(`data`): `AccountSectionList` + +Defined in: [src/parser/classes/AccountSectionList.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountSectionList.ts#L15) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AccountSectionList`](AccountSectionList.md) +`AccountSectionList` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AccountSectionList.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountSectionList.ts#L15) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`AccountItemSection`](AccountItemSection.md)\> -#### Defined in - -[src/parser/classes/AccountSectionList.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountSectionList.ts#L12) +Defined in: [src/parser/classes/AccountSectionList.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountSectionList.ts#L12) *** @@ -44,9 +44,7 @@ > **footers**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`AccountChannel`](AccountChannel.md)\> -#### Defined in - -[src/parser/classes/AccountSectionList.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountSectionList.ts#L13) +Defined in: [src/parser/classes/AccountSectionList.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountSectionList.ts#L13) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AccountSectionList'` +Defined in: [src/parser/classes/AccountSectionList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AccountSectionList.ts#L10) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AccountSectionList.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AccountSectionList.ts#L10) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AccountSectionList & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ActiveAccountHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ActiveAccountHeader.md new file mode 100644 index 00000000..7a48d5e8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ActiveAccountHeader.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ActiveAccountHeader + +# Class: ActiveAccountHeader + +Defined in: [src/parser/classes/ActiveAccountHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ActiveAccountHeader.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ActiveAccountHeader**(`data`): `ActiveAccountHeader` + +Defined in: [src/parser/classes/ActiveAccountHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ActiveAccountHeader.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ActiveAccountHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### account\_name + +> **account\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ActiveAccountHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ActiveAccountHeader.ts#L10) + +*** + +### account\_photo + +> **account\_photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ActiveAccountHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ActiveAccountHeader.ts#L11) + +*** + +### channel\_handle + +> **channel\_handle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ActiveAccountHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ActiveAccountHeader.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ActiveAccountHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ActiveAccountHeader.ts#L12) + +*** + +### manage\_account\_title + +> **manage\_account\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ActiveAccountHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ActiveAccountHeader.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ActiveAccountHeader'` + +Defined in: [src/parser/classes/ActiveAccountHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ActiveAccountHeader.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ActiveAccountHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ActiveAccountHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AddBannerToLiveChatCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddBannerToLiveChatCommand.md new file mode 100644 index 00000000..3d67f084 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddBannerToLiveChatCommand.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AddBannerToLiveChatCommand + +# Class: AddBannerToLiveChatCommand + +Defined in: [src/parser/classes/livechat/AddBannerToLiveChatCommand.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddBannerToLiveChatCommand.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AddBannerToLiveChatCommand**(`data`): `AddBannerToLiveChatCommand` + +Defined in: [src/parser/classes/livechat/AddBannerToLiveChatCommand.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddBannerToLiveChatCommand.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AddBannerToLiveChatCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### banner + +> **banner**: [`LiveChatBanner`](LiveChatBanner.md) \| `null` + +Defined in: [src/parser/classes/livechat/AddBannerToLiveChatCommand.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddBannerToLiveChatCommand.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AddBannerToLiveChatCommand'` + +Defined in: [src/parser/classes/livechat/AddBannerToLiveChatCommand.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddBannerToLiveChatCommand.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AddBannerToLiveChatCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AddBannerToLiveChatCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AddChatItemAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddChatItemAction.md new file mode 100644 index 00000000..72cb01e7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddChatItemAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AddChatItemAction + +# Class: AddChatItemAction + +Defined in: [src/parser/classes/livechat/AddChatItemAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddChatItemAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AddChatItemAction**(`data`): `AddChatItemAction` + +Defined in: [src/parser/classes/livechat/AddChatItemAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddChatItemAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AddChatItemAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### client\_id? + +> `optional` **client\_id**: `string` + +Defined in: [src/parser/classes/livechat/AddChatItemAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddChatItemAction.ts#L9) + +*** + +### item + +> **item**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/AddChatItemAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddChatItemAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AddChatItemAction'` + +Defined in: [src/parser/classes/livechat/AddChatItemAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddChatItemAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AddChatItemAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AddChatItemAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AddLiveChatTickerItemAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddLiveChatTickerItemAction.md new file mode 100644 index 00000000..1e2221d0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddLiveChatTickerItemAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AddLiveChatTickerItemAction + +# Class: AddLiveChatTickerItemAction + +Defined in: [src/parser/classes/livechat/AddLiveChatTickerItemAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddLiveChatTickerItemAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AddLiveChatTickerItemAction**(`data`): `AddLiveChatTickerItemAction` + +Defined in: [src/parser/classes/livechat/AddLiveChatTickerItemAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddLiveChatTickerItemAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AddLiveChatTickerItemAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### duration\_sec + +> **duration\_sec**: `string` + +Defined in: [src/parser/classes/livechat/AddLiveChatTickerItemAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddLiveChatTickerItemAction.ts#L9) + +*** + +### item + +> **item**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/AddLiveChatTickerItemAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddLiveChatTickerItemAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AddLiveChatTickerItemAction'` + +Defined in: [src/parser/classes/livechat/AddLiveChatTickerItemAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/AddLiveChatTickerItemAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AddLiveChatTickerItemAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AddLiveChatTickerItemAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/AddToPlaylist.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylist.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/AddToPlaylist.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylist.md index 4e33bcea..01d2b6a5 100644 --- a/docs/api/namespaces/YTNodes/classes/AddToPlaylist.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylist.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AddToPlaylist +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AddToPlaylist # Class: AddToPlaylist +Defined in: [src/parser/classes/AddToPlaylist.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AddToPlaylist.ts#L7) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AddToPlaylist() +### Constructor -> **new AddToPlaylist**(`data`): [`AddToPlaylist`](AddToPlaylist.md) +> **new AddToPlaylist**(`data`): `AddToPlaylist` + +Defined in: [src/parser/classes/AddToPlaylist.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AddToPlaylist.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AddToPlaylist`](AddToPlaylist.md) +`AddToPlaylist` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AddToPlaylist.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AddToPlaylist.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **actions**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md) \| [`MenuTitle`](MenuTitle.md)\> -#### Defined in - -[src/parser/classes/AddToPlaylist.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AddToPlaylist.ts#L10) +Defined in: [src/parser/classes/AddToPlaylist.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AddToPlaylist.ts#L10) *** @@ -44,9 +44,7 @@ > **playlists**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlaylistAddToOption`](PlaylistAddToOption.md)\> -#### Defined in - -[src/parser/classes/AddToPlaylist.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AddToPlaylist.ts#L11) +Defined in: [src/parser/classes/AddToPlaylist.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AddToPlaylist.ts#L11) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AddToPlaylist'` +Defined in: [src/parser/classes/AddToPlaylist.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AddToPlaylist.ts#L8) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AddToPlaylist.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AddToPlaylist.ts#L8) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AddToPlaylist & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistCommand.md new file mode 100644 index 00000000..bdd98cfb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistCommand.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AddToPlaylistCommand + +# Class: AddToPlaylistCommand + +Defined in: [src/parser/classes/commands/AddToPlaylistCommand.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/AddToPlaylistCommand.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AddToPlaylistCommand**(`data`): `AddToPlaylistCommand` + +Defined in: [src/parser/classes/commands/AddToPlaylistCommand.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/AddToPlaylistCommand.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AddToPlaylistCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/commands/AddToPlaylistCommand.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/AddToPlaylistCommand.ts#L11) + +*** + +### list\_type + +> **list\_type**: `string` + +Defined in: [src/parser/classes/commands/AddToPlaylistCommand.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/AddToPlaylistCommand.ts#L10) + +*** + +### open\_miniplayer + +> **open\_miniplayer**: `boolean` + +Defined in: [src/parser/classes/commands/AddToPlaylistCommand.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/AddToPlaylistCommand.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/commands/AddToPlaylistCommand.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/AddToPlaylistCommand.ts#L9) + +*** + +### video\_ids + +> **video\_ids**: `string`[] + +Defined in: [src/parser/classes/commands/AddToPlaylistCommand.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/AddToPlaylistCommand.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'AddToPlaylistCommand'` + +Defined in: [src/parser/classes/commands/AddToPlaylistCommand.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/AddToPlaylistCommand.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AddToPlaylistCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AddToPlaylistCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/AddToPlaylistEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistEndpoint.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/AddToPlaylistEndpoint.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistEndpoint.md index a0580085..e0a25971 100644 --- a/docs/api/namespaces/YTNodes/classes/AddToPlaylistEndpoint.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistEndpoint.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AddToPlaylistEndpoint +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AddToPlaylistEndpoint # Class: AddToPlaylistEndpoint +Defined in: [src/parser/classes/endpoints/AddToPlaylistEndpoint.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistEndpoint.ts#L4) + ## Extends - [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md) ## Constructors -### new AddToPlaylistEndpoint() +### Constructor -> **new AddToPlaylistEndpoint**(`data`): [`AddToPlaylistEndpoint`](AddToPlaylistEndpoint.md) +> **new AddToPlaylistEndpoint**(`data`): `AddToPlaylistEndpoint` + +Defined in: [src/parser/classes/endpoints/AddToPlaylistEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistEndpoint.ts#L7) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AddToPlaylistEndpoint`](AddToPlaylistEndpoint.md) +`AddToPlaylistEndpoint` #### Overrides -[`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`constructor`](AddToPlaylistServiceEndpoint.md#constructors) - -#### Defined in - -[src/parser/classes/endpoints/AddToPlaylistEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/AddToPlaylistEndpoint.ts#L7) +[`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`constructor`](AddToPlaylistServiceEndpoint.md#constructor) ## Properties @@ -34,45 +36,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`type`](AddToPlaylistServiceEndpoint.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### type > `static` **type**: `string` = `'AddToPlaylistEndpoint'` +Defined in: [src/parser/classes/endpoints/AddToPlaylistEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistEndpoint.ts#L5) + #### Overrides [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`type`](AddToPlaylistServiceEndpoint.md#type-1) -#### Defined in - -[src/parser/classes/endpoints/AddToPlaylistEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/AddToPlaylistEndpoint.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -90,34 +96,30 @@ If the node is not of the given type [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`as`](AddToPlaylistServiceEndpoint.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### buildRequest() -> **buildRequest**(): [`AddToPlaylistServiceRequest`](../../APIResponseTypes/type-aliases/AddToPlaylistServiceRequest.md) +> **buildRequest**(): [`AddToPlaylistServiceRequest`](../../../../type-aliases/AddToPlaylistServiceRequest.md) + +Defined in: [src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L19) #### Returns -[`AddToPlaylistServiceRequest`](../../APIResponseTypes/type-aliases/AddToPlaylistServiceRequest.md) +[`AddToPlaylistServiceRequest`](../../../../type-aliases/AddToPlaylistServiceRequest.md) #### Inherited from [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`buildRequest`](AddToPlaylistServiceEndpoint.md#buildrequest) -#### Defined in - -[src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L19) - *** ### getApiPath() > **getApiPath**(): `string` +Defined in: [src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L15) + #### Returns `string` @@ -126,27 +128,31 @@ If the node is not of the given type [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`getApiPath`](AddToPlaylistServiceEndpoint.md#getapipath) -#### Defined in - -[src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L15) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AddToPlaylistEndpoint & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -160,27 +166,31 @@ Whether the node has the key [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`hasKey`](AddToPlaylistServiceEndpoint.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -194,27 +204,31 @@ whether the node is of the given type [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`is`](AddToPlaylistServiceEndpoint.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -231,7 +245,3 @@ If the node does not have the key #### Inherited from [`AddToPlaylistServiceEndpoint`](AddToPlaylistServiceEndpoint.md).[`key`](AddToPlaylistServiceEndpoint.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistServiceEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistServiceEndpoint.md new file mode 100644 index 00000000..f0fd7769 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AddToPlaylistServiceEndpoint.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AddToPlaylistServiceEndpoint + +# Class: AddToPlaylistServiceEndpoint + +Defined in: [src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`AddToPlaylistEndpoint`](AddToPlaylistEndpoint.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`AddToPlaylistServiceRequest`](../../../../type-aliases/AddToPlaylistServiceRequest.md)\> + +## Constructors + +### Constructor + +> **new AddToPlaylistServiceEndpoint**(`data`): `AddToPlaylistServiceEndpoint` + +Defined in: [src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AddToPlaylistServiceEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AddToPlaylistServiceEndpoint'` + +Defined in: [src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`AddToPlaylistServiceRequest`](../../../../type-aliases/AddToPlaylistServiceRequest.md) + +Defined in: [src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L19) + +#### Returns + +[`AddToPlaylistServiceRequest`](../../../../type-aliases/AddToPlaylistServiceRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/AddToPlaylistServiceEndpoint.ts#L15) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AddToPlaylistServiceEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AddToPlaylistServiceEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Alert.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Alert.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/Alert.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Alert.md index aa16cd80b..cb3589d4 100644 --- a/docs/api/namespaces/YTNodes/classes/Alert.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Alert.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Alert +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Alert # Class: Alert +Defined in: [src/parser/classes/Alert.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Alert.ts#L7) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Alert() +### Constructor -> **new Alert**(`data`): [`Alert`](Alert.md) +> **new Alert**(`data`): `Alert` + +Defined in: [src/parser/classes/Alert.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Alert.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Alert`](Alert.md) +`Alert` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Alert.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Alert.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **alert\_type**: `AlertType` -#### Defined in - -[src/parser/classes/Alert.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Alert.ts#L11) +Defined in: [src/parser/classes/Alert.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Alert.ts#L11) *** @@ -44,9 +44,7 @@ > **text**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/Alert.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Alert.ts#L10) +Defined in: [src/parser/classes/Alert.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Alert.ts#L10) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Alert'` +Defined in: [src/parser/classes/Alert.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Alert.ts#L8) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Alert.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Alert.ts#L8) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Alert & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AlertWithButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AlertWithButton.md new file mode 100644 index 00000000..3ccc25a0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AlertWithButton.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AlertWithButton + +# Class: AlertWithButton + +Defined in: [src/parser/classes/AlertWithButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AlertWithButton.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AlertWithButton**(`data`): `AlertWithButton` + +Defined in: [src/parser/classes/AlertWithButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AlertWithButton.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AlertWithButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### alert\_type + +> **alert\_type**: `string` + +Defined in: [src/parser/classes/AlertWithButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AlertWithButton.ts#L10) + +*** + +### dismiss\_button + +> **dismiss\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/AlertWithButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AlertWithButton.ts#L11) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/AlertWithButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AlertWithButton.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AlertWithButton'` + +Defined in: [src/parser/classes/AlertWithButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AlertWithButton.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AlertWithButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AlertWithButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AnchoredSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AnchoredSection.md new file mode 100644 index 00000000..adff9141 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AnchoredSection.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AnchoredSection + +# Class: AnchoredSection + +Defined in: [src/parser/classes/ytkids/AnchoredSection.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/AnchoredSection.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AnchoredSection**(`data`): `AnchoredSection` + +Defined in: [src/parser/classes/ytkids/AnchoredSection.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/AnchoredSection.ts#L19) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AnchoredSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### category\_assets + +> **category\_assets**: `object` + +Defined in: [src/parser/classes/ytkids/AnchoredSection.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/AnchoredSection.ts#L13) + +#### asset\_key + +> **asset\_key**: `string` + +#### background\_color + +> **background\_color**: `string` + +*** + +### category\_type + +> **category\_type**: `string` + +Defined in: [src/parser/classes/ytkids/AnchoredSection.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/AnchoredSection.ts#L17) + +*** + +### content + +> **content**: [`SectionList`](SectionList.md) \| `null` + +Defined in: [src/parser/classes/ytkids/AnchoredSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/AnchoredSection.ts#L11) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ytkids/AnchoredSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/AnchoredSection.ts#L12) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/ytkids/AnchoredSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/AnchoredSection.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AnchoredSection'` + +Defined in: [src/parser/classes/ytkids/AnchoredSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/AnchoredSection.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AnchoredSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AnchoredSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/AnimatedThumbnailOverlayView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AnimatedThumbnailOverlayView.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/AnimatedThumbnailOverlayView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AnimatedThumbnailOverlayView.md index e92787f1..ab52dabd 100644 --- a/docs/api/namespaces/YTNodes/classes/AnimatedThumbnailOverlayView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AnimatedThumbnailOverlayView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AnimatedThumbnailOverlayView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AnimatedThumbnailOverlayView # Class: AnimatedThumbnailOverlayView +Defined in: [src/parser/classes/AnimatedThumbnailOverlayView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AnimatedThumbnailOverlayView.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AnimatedThumbnailOverlayView() +### Constructor -> **new AnimatedThumbnailOverlayView**(`data`): [`AnimatedThumbnailOverlayView`](AnimatedThumbnailOverlayView.md) +> **new AnimatedThumbnailOverlayView**(`data`): `AnimatedThumbnailOverlayView` + +Defined in: [src/parser/classes/AnimatedThumbnailOverlayView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AnimatedThumbnailOverlayView.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AnimatedThumbnailOverlayView`](AnimatedThumbnailOverlayView.md) +`AnimatedThumbnailOverlayView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AnimatedThumbnailOverlayView.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AnimatedThumbnailOverlayView.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/AnimatedThumbnailOverlayView.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AnimatedThumbnailOverlayView.ts#L8) +Defined in: [src/parser/classes/AnimatedThumbnailOverlayView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AnimatedThumbnailOverlayView.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AnimatedThumbnailOverlayView'` +Defined in: [src/parser/classes/AnimatedThumbnailOverlayView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AnimatedThumbnailOverlayView.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AnimatedThumbnailOverlayView.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AnimatedThumbnailOverlayView.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AnimatedThumbnailOverlayView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/AttributionView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AttributionView.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/AttributionView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AttributionView.md index d59179a7..3042cca2 100644 --- a/docs/api/namespaces/YTNodes/classes/AttributionView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AttributionView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AttributionView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AttributionView # Class: AttributionView +Defined in: [src/parser/classes/AttributionView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AttributionView.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AttributionView() +### Constructor -> **new AttributionView**(`data`): [`AttributionView`](AttributionView.md) +> **new AttributionView**(`data`): `AttributionView` + +Defined in: [src/parser/classes/AttributionView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AttributionView.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AttributionView`](AttributionView.md) +`AttributionView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AttributionView.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AttributionView.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **suffix**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/AttributionView.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AttributionView.ts#L9) +Defined in: [src/parser/classes/AttributionView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AttributionView.ts#L9) *** @@ -44,9 +44,7 @@ > **text**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/AttributionView.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AttributionView.ts#L8) +Defined in: [src/parser/classes/AttributionView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AttributionView.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AttributionView'` +Defined in: [src/parser/classes/AttributionView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AttributionView.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AttributionView.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AttributionView.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AttributionView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/AudioOnlyPlayability.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AudioOnlyPlayability.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/AudioOnlyPlayability.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AudioOnlyPlayability.md index 3c4a149c..efacb796 100644 --- a/docs/api/namespaces/YTNodes/classes/AudioOnlyPlayability.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AudioOnlyPlayability.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AudioOnlyPlayability +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AudioOnlyPlayability # Class: AudioOnlyPlayability +Defined in: [src/parser/classes/AudioOnlyPlayability.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AudioOnlyPlayability.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AudioOnlyPlayability() +### Constructor -> **new AudioOnlyPlayability**(`data`): [`AudioOnlyPlayability`](AudioOnlyPlayability.md) +> **new AudioOnlyPlayability**(`data`): `AudioOnlyPlayability` + +Defined in: [src/parser/classes/AudioOnlyPlayability.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AudioOnlyPlayability.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AudioOnlyPlayability`](AudioOnlyPlayability.md) +`AudioOnlyPlayability` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AudioOnlyPlayability.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AudioOnlyPlayability.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **audio\_only\_availability**: `string` -#### Defined in - -[src/parser/classes/AudioOnlyPlayability.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AudioOnlyPlayability.ts#L7) +Defined in: [src/parser/classes/AudioOnlyPlayability.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AudioOnlyPlayability.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AudioOnlyPlayability'` +Defined in: [src/parser/classes/AudioOnlyPlayability.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AudioOnlyPlayability.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AudioOnlyPlayability.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AudioOnlyPlayability.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AudioOnlyPlayability & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AuthorCommentBadge.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AuthorCommentBadge.md new file mode 100644 index 00000000..cdb35db5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AuthorCommentBadge.md @@ -0,0 +1,253 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AuthorCommentBadge + +# Class: AuthorCommentBadge + +Defined in: [src/parser/classes/comments/AuthorCommentBadge.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/AuthorCommentBadge.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AuthorCommentBadge**(`data`): `AuthorCommentBadge` + +Defined in: [src/parser/classes/comments/AuthorCommentBadge.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/AuthorCommentBadge.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AuthorCommentBadge` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/comments/AuthorCommentBadge.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/AuthorCommentBadge.ts#L9) + +*** + +### style? + +> `optional` **style**: `string` + +Defined in: [src/parser/classes/comments/AuthorCommentBadge.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/AuthorCommentBadge.ts#L11) + +*** + +### tooltip + +> **tooltip**: `string` + +Defined in: [src/parser/classes/comments/AuthorCommentBadge.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/AuthorCommentBadge.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AuthorCommentBadge'` + +Defined in: [src/parser/classes/comments/AuthorCommentBadge.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/AuthorCommentBadge.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### orig\_badge + +#### Get Signature + +> **get** **orig\_badge**(): [`RawNode`](../../../../type-aliases/RawNode.md) + +Defined in: [src/parser/classes/comments/AuthorCommentBadge.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/AuthorCommentBadge.ts#L31) + +##### Returns + +[`RawNode`](../../../../type-aliases/RawNode.md) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AuthorCommentBadge & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AuthorCommentBadge & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/AutomixPreviewVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AutomixPreviewVideo.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/AutomixPreviewVideo.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AutomixPreviewVideo.md index 662d4873..1046dcca 100644 --- a/docs/api/namespaces/YTNodes/classes/AutomixPreviewVideo.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AutomixPreviewVideo.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AutomixPreviewVideo +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AutomixPreviewVideo # Class: AutomixPreviewVideo +Defined in: [src/parser/classes/AutomixPreviewVideo.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AutomixPreviewVideo.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AutomixPreviewVideo() +### Constructor -> **new AutomixPreviewVideo**(`data`): [`AutomixPreviewVideo`](AutomixPreviewVideo.md) +> **new AutomixPreviewVideo**(`data`): `AutomixPreviewVideo` + +Defined in: [src/parser/classes/AutomixPreviewVideo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AutomixPreviewVideo.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AutomixPreviewVideo`](AutomixPreviewVideo.md) +`AutomixPreviewVideo` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AutomixPreviewVideo.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AutomixPreviewVideo.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,59 +36,61 @@ > `optional` **playlist\_video**: `object` +Defined in: [src/parser/classes/AutomixPreviewVideo.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AutomixPreviewVideo.ts#L8) + #### endpoint > **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) -#### Defined in - -[src/parser/classes/AutomixPreviewVideo.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AutomixPreviewVideo.ts#L8) - *** ### type > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AutomixPreviewVideo'` +Defined in: [src/parser/classes/AutomixPreviewVideo.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AutomixPreviewVideo.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AutomixPreviewVideo.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AutomixPreviewVideo.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -104,27 +108,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AutomixPreviewVideo & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -138,27 +146,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -172,27 +184,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -209,7 +225,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/AvatarStackView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AvatarStackView.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/AvatarStackView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/AvatarStackView.md index eae41a74..4a0db2a0 100644 --- a/docs/api/namespaces/YTNodes/classes/AvatarStackView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AvatarStackView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / AvatarStackView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AvatarStackView # Class: AvatarStackView +Defined in: [src/parser/classes/AvatarStackView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarStackView.ts#L9) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new AvatarStackView() +### Constructor -> **new AvatarStackView**(`data`): [`AvatarStackView`](AvatarStackView.md) +> **new AvatarStackView**(`data`): `AvatarStackView` + +Defined in: [src/parser/classes/AvatarStackView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarStackView.ts#L16) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`AvatarStackView`](AvatarStackView.md) +`AvatarStackView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/AvatarStackView.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AvatarStackView.ts#L16) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **avatars**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`AvatarView`](AvatarView.md)\> -#### Defined in - -[src/parser/classes/AvatarStackView.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AvatarStackView.ts#L12) +Defined in: [src/parser/classes/AvatarStackView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarStackView.ts#L12) *** @@ -44,9 +44,7 @@ > **renderer\_context**: [`RendererContext`](../../Misc/classes/RendererContext.md) -#### Defined in - -[src/parser/classes/AvatarStackView.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AvatarStackView.ts#L14) +Defined in: [src/parser/classes/AvatarStackView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarStackView.ts#L14) *** @@ -54,9 +52,7 @@ > `optional` **text**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/AvatarStackView.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AvatarStackView.ts#L13) +Defined in: [src/parser/classes/AvatarStackView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarStackView.ts#L13) *** @@ -64,45 +60,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'AvatarStackView'` +Defined in: [src/parser/classes/AvatarStackView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarStackView.ts#L10) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/AvatarStackView.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/AvatarStackView.ts#L10) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -120,27 +120,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is AvatarStackView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -154,27 +158,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -188,27 +196,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -225,7 +237,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/AvatarView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/AvatarView.md new file mode 100644 index 00000000..c39b60c4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/AvatarView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / AvatarView + +# Class: AvatarView + +Defined in: [src/parser/classes/AvatarView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new AvatarView**(`data`): `AvatarView` + +Defined in: [src/parser/classes/AvatarView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarView.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`AvatarView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### avatar\_image\_size + +> **avatar\_image\_size**: `string` + +Defined in: [src/parser/classes/AvatarView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarView.ts#L14) + +*** + +### image + +> **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/AvatarView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarView.ts#L8) + +*** + +### image\_processor + +> **image\_processor**: \{ `border_image_processor`: \{ `circular`: `boolean`; \}; \} \| `undefined` + +Defined in: [src/parser/classes/AvatarView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'AvatarView'` + +Defined in: [src/parser/classes/AvatarView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/AvatarView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is AvatarView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is AvatarView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/BackgroundPromo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BackgroundPromo.md new file mode 100644 index 00000000..6cd1d19a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BackgroundPromo.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BackgroundPromo + +# Class: BackgroundPromo + +Defined in: [src/parser/classes/BackgroundPromo.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackgroundPromo.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new BackgroundPromo**(`data`): `BackgroundPromo` + +Defined in: [src/parser/classes/BackgroundPromo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackgroundPromo.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`BackgroundPromo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### body\_text? + +> `optional` **body\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BackgroundPromo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackgroundPromo.ts#L10) + +*** + +### cta\_button? + +> `optional` **cta\_button**: [`Button`](Button.md) \| [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/BackgroundPromo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackgroundPromo.ts#L11) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/BackgroundPromo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackgroundPromo.ts#L12) + +*** + +### title? + +> `optional` **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BackgroundPromo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackgroundPromo.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'BackgroundPromo'` + +Defined in: [src/parser/classes/BackgroundPromo.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackgroundPromo.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is BackgroundPromo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is BackgroundPromo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/BackstageImage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BackstageImage.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/BackstageImage.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/BackstageImage.md index b6c28c28..3e2b76f4 100644 --- a/docs/api/namespaces/YTNodes/classes/BackstageImage.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BackstageImage.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / BackstageImage +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BackstageImage # Class: BackstageImage +Defined in: [src/parser/classes/BackstageImage.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstageImage.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new BackstageImage() +### Constructor -> **new BackstageImage**(`data`): [`BackstageImage`](BackstageImage.md) +> **new BackstageImage**(`data`): `BackstageImage` + +Defined in: [src/parser/classes/BackstageImage.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstageImage.ts#L12) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`BackstageImage`](BackstageImage.md) +`BackstageImage` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/BackstageImage.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BackstageImage.ts#L12) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) -#### Defined in - -[src/parser/classes/BackstageImage.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BackstageImage.ts#L10) +Defined in: [src/parser/classes/BackstageImage.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstageImage.ts#L10) *** @@ -44,9 +44,7 @@ > **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/BackstageImage.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BackstageImage.ts#L9) +Defined in: [src/parser/classes/BackstageImage.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstageImage.ts#L9) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'BackstageImage'` +Defined in: [src/parser/classes/BackstageImage.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstageImage.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/BackstageImage.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BackstageImage.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is BackstageImage & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/BackstagePost.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BackstagePost.md new file mode 100644 index 00000000..884c8b9f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BackstagePost.md @@ -0,0 +1,323 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BackstagePost + +# Class: BackstagePost + +Defined in: [src/parser/classes/BackstagePost.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`Post`](Post.md) + +## Constructors + +### Constructor + +> **new BackstagePost**(`data`): `BackstagePost` + +Defined in: [src/parser/classes/BackstagePost.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L27) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`BackstagePost` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### action\_buttons? + +> `optional` **action\_buttons**: [`CommentActionButtons`](CommentActionButtons.md) \| `null` + +Defined in: [src/parser/classes/BackstagePost.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L21) + +*** + +### attachment + +> **attachment**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `undefined` + +Defined in: [src/parser/classes/BackstagePost.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L25) + +*** + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/BackstagePost.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L14) + +*** + +### content + +> **content**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BackstagePost.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L15) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/BackstagePost.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L24) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/BackstagePost.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L13) + +*** + +### menu? + +> `optional` **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/BackstagePost.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L20) + +*** + +### poll\_status? + +> `optional` **poll\_status**: `string` + +Defined in: [src/parser/classes/BackstagePost.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L17) + +*** + +### published + +> **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BackstagePost.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L16) + +*** + +### surface + +> **surface**: `string` + +Defined in: [src/parser/classes/BackstagePost.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L23) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### vote\_button? + +> `optional` **vote\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/BackstagePost.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L22) + +*** + +### vote\_count? + +> `optional` **vote\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BackstagePost.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L19) + +*** + +### vote\_status? + +> `optional` **vote\_status**: `string` + +Defined in: [src/parser/classes/BackstagePost.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L18) + +*** + +### type + +> `static` **type**: `string` = `'BackstagePost'` + +Defined in: [src/parser/classes/BackstagePost.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is BackstagePost & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is BackstagePost & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/BackstagePostThread.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BackstagePostThread.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/BackstagePostThread.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/BackstagePostThread.md index 5afa6be5..2ba73777 100644 --- a/docs/api/namespaces/YTNodes/classes/BackstagePostThread.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BackstagePostThread.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / BackstagePostThread +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BackstagePostThread # Class: BackstagePostThread +Defined in: [src/parser/classes/BackstagePostThread.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePostThread.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new BackstagePostThread() +### Constructor -> **new BackstagePostThread**(`data`): [`BackstagePostThread`](BackstagePostThread.md) +> **new BackstagePostThread**(`data`): `BackstagePostThread` + +Defined in: [src/parser/classes/BackstagePostThread.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePostThread.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`BackstagePostThread`](BackstagePostThread.md) +`BackstagePostThread` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/BackstagePostThread.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BackstagePostThread.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **post**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/BackstagePostThread.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BackstagePostThread.ts#L7) +Defined in: [src/parser/classes/BackstagePostThread.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePostThread.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'BackstagePostThread'` +Defined in: [src/parser/classes/BackstagePostThread.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePostThread.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/BackstagePostThread.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BackstagePostThread.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is BackstagePostThread & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/BadgeView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BadgeView.md new file mode 100644 index 00000000..6e312f5f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BadgeView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BadgeView + +# Class: BadgeView + +Defined in: [src/parser/classes/BadgeView.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BadgeView.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new BadgeView**(`data`): `BadgeView` + +Defined in: [src/parser/classes/BadgeView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BadgeView.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`BadgeView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility\_label + +> **accessibility\_label**: `string` + +Defined in: [src/parser/classes/BadgeView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BadgeView.ts#L7) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/BadgeView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BadgeView.ts#L6) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/BadgeView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BadgeView.ts#L5) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `readonly` `static` **type**: `string` = `'YTNode'` + +Defined in: [src/parser/helpers.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L7) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is BadgeView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is BadgeView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/BrowseEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BrowseEndpoint.md new file mode 100644 index 00000000..d3a7606f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BrowseEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BrowseEndpoint + +# Class: BrowseEndpoint + +Defined in: [src/parser/classes/endpoints/BrowseEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/BrowseEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`BrowseRequest`](../../../../type-aliases/BrowseRequest.md)\> + +## Constructors + +### Constructor + +> **new BrowseEndpoint**(`data`): `BrowseEndpoint` + +Defined in: [src/parser/classes/endpoints/BrowseEndpoint.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/BrowseEndpoint.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`BrowseEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'BrowseEndpoint'` + +Defined in: [src/parser/classes/endpoints/BrowseEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/BrowseEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`BrowseRequest`](../../../../type-aliases/BrowseRequest.md) + +Defined in: [src/parser/classes/endpoints/BrowseEndpoint.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/BrowseEndpoint.ts#L19) + +#### Returns + +[`BrowseRequest`](../../../../type-aliases/BrowseRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/BrowseEndpoint.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/BrowseEndpoint.ts#L15) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is BrowseEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is BrowseEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/BrowseFeedActions.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BrowseFeedActions.md similarity index 53% rename from docs/api/namespaces/YTNodes/classes/BrowseFeedActions.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/BrowseFeedActions.md index 2890ac94..815186ab 100644 --- a/docs/api/namespaces/YTNodes/classes/BrowseFeedActions.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BrowseFeedActions.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / BrowseFeedActions +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BrowseFeedActions # Class: BrowseFeedActions +Defined in: [src/parser/classes/BrowseFeedActions.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowseFeedActions.ts#L10) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new BrowseFeedActions() +### Constructor -> **new BrowseFeedActions**(`data`): [`BrowseFeedActions`](BrowseFeedActions.md) +> **new BrowseFeedActions**(`data`): `BrowseFeedActions` + +Defined in: [src/parser/classes/BrowseFeedActions.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowseFeedActions.ts#L15) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`BrowseFeedActions`](BrowseFeedActions.md) +`BrowseFeedActions` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/BrowseFeedActions.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BrowseFeedActions.ts#L15) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md) \| [`ToggleButton`](ToggleButton.md) \| [`SubFeedSelector`](SubFeedSelector.md) \| [`EomSettingsDisclaimer`](EomSettingsDisclaimer.md) \| [`CompactLink`](CompactLink.md) \| [`SearchBox`](SearchBox.md)\> -#### Defined in - -[src/parser/classes/BrowseFeedActions.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BrowseFeedActions.ts#L13) +Defined in: [src/parser/classes/BrowseFeedActions.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowseFeedActions.ts#L13) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'BrowseFeedActions'` +Defined in: [src/parser/classes/BrowseFeedActions.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowseFeedActions.ts#L11) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/BrowseFeedActions.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/BrowseFeedActions.ts#L11) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is BrowseFeedActions & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/BrowserMediaSession.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BrowserMediaSession.md new file mode 100644 index 00000000..682a9bab --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BrowserMediaSession.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BrowserMediaSession + +# Class: BrowserMediaSession + +Defined in: [src/parser/classes/BrowserMediaSession.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowserMediaSession.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new BrowserMediaSession**(`data`): `BrowserMediaSession` + +Defined in: [src/parser/classes/BrowserMediaSession.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowserMediaSession.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`BrowserMediaSession` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### album + +> **album**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BrowserMediaSession.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowserMediaSession.ts#L9) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/BrowserMediaSession.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowserMediaSession.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'BrowserMediaSession'` + +Defined in: [src/parser/classes/BrowserMediaSession.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BrowserMediaSession.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is BrowserMediaSession & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is BrowserMediaSession & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/BumperUserEduContentView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/BumperUserEduContentView.md new file mode 100644 index 00000000..4e346feb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/BumperUserEduContentView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / BumperUserEduContentView + +# Class: BumperUserEduContentView + +Defined in: [src/parser/classes/livechat/items/BumperUserEduContentView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/BumperUserEduContentView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new BumperUserEduContentView**(`data`): `BumperUserEduContentView` + +Defined in: [src/parser/classes/livechat/items/BumperUserEduContentView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/BumperUserEduContentView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`BumperUserEduContentView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### image\_color + +> **image\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/BumperUserEduContentView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/BumperUserEduContentView.ts#L10) + +*** + +### image\_name + +> **image\_name**: `string` + +Defined in: [src/parser/classes/livechat/items/BumperUserEduContentView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/BumperUserEduContentView.ts#L9) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/BumperUserEduContentView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/BumperUserEduContentView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'BumperUserEduContentView'` + +Defined in: [src/parser/classes/livechat/items/BumperUserEduContentView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/BumperUserEduContentView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is BumperUserEduContentView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is BumperUserEduContentView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Button.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Button.md new file mode 100644 index 00000000..babb99d8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Button.md @@ -0,0 +1,300 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Button + +# Class: Button + +Defined in: [src/parser/classes/Button.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`MenuNavigationItem`](MenuNavigationItem.md) +- [`MenuServiceItem`](MenuServiceItem.md) + +## Constructors + +### Constructor + +> **new Button**(`data`): `Button` + +Defined in: [src/parser/classes/Button.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Button` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/Button.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L19) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Button.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L18) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/Button.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L15) + +*** + +### is\_disabled? + +> `optional` **is\_disabled**: `boolean` + +Defined in: [src/parser/classes/Button.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L16) + +*** + +### label? + +> `optional` **label**: `string` + +Defined in: [src/parser/classes/Button.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L11) + +*** + +### size? + +> `optional` **size**: `string` + +Defined in: [src/parser/classes/Button.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L14) + +*** + +### style? + +> `optional` **style**: `string` + +Defined in: [src/parser/classes/Button.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L13) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/Button.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L17) + +*** + +### text? + +> `optional` **text**: `string` + +Defined in: [src/parser/classes/Button.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L10) + +*** + +### tooltip? + +> `optional` **tooltip**: `string` + +Defined in: [src/parser/classes/Button.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Button'` + +Defined in: [src/parser/classes/Button.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Button & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Button & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ButtonCardView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ButtonCardView.md new file mode 100644 index 00000000..f0e29597 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ButtonCardView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ButtonCardView + +# Class: ButtonCardView + +Defined in: [src/parser/classes/ButtonCardView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonCardView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ButtonCardView**(`data`): `ButtonCardView` + +Defined in: [src/parser/classes/ButtonCardView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonCardView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ButtonCardView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_name + +> **icon\_name**: `string` + +Defined in: [src/parser/classes/ButtonCardView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonCardView.ts#L9) + +*** + +### renderer\_context + +> **renderer\_context**: [`RendererContext`](../../Misc/classes/RendererContext.md) + +Defined in: [src/parser/classes/ButtonCardView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonCardView.ts#L10) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/ButtonCardView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonCardView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ButtonCardView'` + +Defined in: [src/parser/classes/ButtonCardView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonCardView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ButtonCardView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ButtonCardView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ButtonView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ButtonView.md new file mode 100644 index 00000000..ce300b1a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ButtonView.md @@ -0,0 +1,439 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ButtonView + +# Class: ButtonView + +Defined in: [src/parser/classes/ButtonView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ButtonView**(`data`): `ButtonView` + +Defined in: [src/parser/classes/ButtonView.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L38) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ButtonView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility\_id? + +> `optional` **accessibility\_id**: `string` + +Defined in: [src/parser/classes/ButtonView.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L30) + +*** + +### accessibility\_text? + +> `optional` **accessibility\_text**: `string` + +Defined in: [src/parser/classes/ButtonView.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L36) + +*** + +### button\_size? + +> `optional` **button\_size**: `"BUTTON_VIEW_MODEL_SIZE_UNKNOWN"` \| `"BUTTON_VIEW_MODEL_SIZE_DEFAULT"` \| `"BUTTON_VIEW_MODEL_SIZE_COMPACT"` \| `"BUTTON_VIEW_MODEL_SIZE_XSMALL"` \| `"BUTTON_VIEW_MODEL_SIZE_LARGE"` \| `"BUTTON_VIEW_MODEL_SIZE_XLARGE"` \| `"BUTTON_VIEW_MODEL_SIZE_XXLARGE"` + +Defined in: [src/parser/classes/ButtonView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L14) + +*** + +### button\_type? + +> `optional` **button\_type**: `"BUTTON_VIEW_MODEL_TYPE_UNKNOWN"` \| `"BUTTON_VIEW_MODEL_TYPE_FILLED"` \| `"BUTTON_VIEW_MODEL_TYPE_OUTLINE"` \| `"BUTTON_VIEW_MODEL_TYPE_TEXT"` \| `"BUTTON_VIEW_MODEL_TYPE_TONAL"` + +Defined in: [src/parser/classes/ButtonView.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L28) + +*** + +### custom\_background\_color? + +> `optional` **custom\_background\_color**: `number` + +Defined in: [src/parser/classes/ButtonView.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L31) + +*** + +### custom\_border\_color? + +> `optional` **custom\_border\_color**: `number` + +Defined in: [src/parser/classes/ButtonView.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L19) + +*** + +### custom\_dark\_theme\_border\_color? + +> `optional` **custom\_dark\_theme\_border\_color**: `number` + +Defined in: [src/parser/classes/ButtonView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L23) + +*** + +### custom\_font\_color? + +> `optional` **custom\_font\_color**: `number` + +Defined in: [src/parser/classes/ButtonView.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L27) + +*** + +### enable\_full\_width\_margins? + +> `optional` **enable\_full\_width\_margins**: `boolean` + +Defined in: [src/parser/classes/ButtonView.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L26) + +*** + +### enable\_icon\_button? + +> `optional` **enable\_icon\_button**: `boolean` + +Defined in: [src/parser/classes/ButtonView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L11) + +*** + +### enabled? + +> `optional` **enabled**: `boolean` + +Defined in: [src/parser/classes/ButtonView.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L29) + +*** + +### icon\_image? + +> `optional` **icon\_image**: `object` + +Defined in: [src/parser/classes/ButtonView.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L22) + +*** + +### icon\_image\_flip\_for\_rtl? + +> `optional` **icon\_image\_flip\_for\_rtl**: `boolean` + +Defined in: [src/parser/classes/ButtonView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L13) + +*** + +### icon\_name? + +> `optional` **icon\_name**: `string` + +Defined in: [src/parser/classes/ButtonView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L10) + +*** + +### icon\_position? + +> `optional` **icon\_position**: `"BUTTON_VIEW_MODEL_ICON_POSITION_UNKNOWN"` \| `"BUTTON_VIEW_MODEL_ICON_POSITION_TRAILING"` \| `"BUTTON_VIEW_MODEL_ICON_POSITION_LEADING"` \| `"BUTTON_VIEW_MODEL_ICON_POSITION_ABOVE"` \| `"BUTTON_VIEW_MODEL_ICON_POSITION_LEADING_TRAILING"` + +Defined in: [src/parser/classes/ButtonView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L15) + +*** + +### icon\_trailing? + +> `optional` **icon\_trailing**: `boolean` + +Defined in: [src/parser/classes/ButtonView.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L35) + +*** + +### is\_full\_width? + +> `optional` **is\_full\_width**: `boolean` + +Defined in: [src/parser/classes/ButtonView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L16) + +*** + +### on\_disabled\_tap? + +> `optional` **on\_disabled\_tap**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ButtonView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L18) + +*** + +### on\_long\_press? + +> `optional` **on\_long\_press**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ButtonView.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L32) + +*** + +### on\_tap? + +> `optional` **on\_tap**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ButtonView.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L20) + +*** + +### on\_visible? + +> `optional` **on\_visible**: `object` + +Defined in: [src/parser/classes/ButtonView.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L34) + +*** + +### secondary\_icon\_image? + +> `optional` **secondary\_icon\_image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ButtonView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L9) + +*** + +### state? + +> `optional` **state**: `"BUTTON_VIEW_MODEL_STATE_UNKNOWN"` \| `"BUTTON_VIEW_MODEL_STATE_ACTIVE"` \| `"BUTTON_VIEW_MODEL_STATE_INACTIVE"` \| `"BUTTON_VIEW_MODEL_STATE_DISABLED"` + +Defined in: [src/parser/classes/ButtonView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L17) + +*** + +### style? + +> `optional` **style**: `"BUTTON_VIEW_MODEL_STYLE_UNKNOWN"` \| `"BUTTON_VIEW_MODEL_STYLE_CTA"` \| `"BUTTON_VIEW_MODEL_STYLE_BRAND"` \| `"BUTTON_VIEW_MODEL_STYLE_ADS_CTA"` \| `"BUTTON_VIEW_MODEL_STYLE_OVERLAY"` \| `"BUTTON_VIEW_MODEL_STYLE_CTA_THEMED"` \| `"BUTTON_VIEW_MODEL_STYLE_BLACK_CTA"` \| `"BUTTON_VIEW_MODEL_STYLE_CUSTOM"` \| `"BUTTON_VIEW_MODEL_STYLE_MONO"` \| `"BUTTON_VIEW_MODEL_STYLE_OVERLAY_DARK"` \| `"BUTTON_VIEW_MODEL_STYLE_CTA_OVERLAY"` \| `"BUTTON_VIEW_MODEL_STYLE_BRAND_AI"` \| `"BUTTON_VIEW_MODEL_STYLE_YT_GRADIENT"` \| `"BUTTON_VIEW_MODEL_STYLE_BRAND_GRADIENT"` + +Defined in: [src/parser/classes/ButtonView.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L21) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/ButtonView.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L25) + +*** + +### title? + +> `optional` **title**: `string` + +Defined in: [src/parser/classes/ButtonView.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L24) + +*** + +### title\_formatted? + +> `optional` **title\_formatted**: `object` + +Defined in: [src/parser/classes/ButtonView.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L33) + +*** + +### tooltip? + +> `optional` **tooltip**: `string` + +Defined in: [src/parser/classes/ButtonView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ButtonView'` + +Defined in: [src/parser/classes/ButtonView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ButtonView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ButtonView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ButtonView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/C4TabbedHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/C4TabbedHeader.md new file mode 100644 index 00000000..87cca1fe --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/C4TabbedHeader.md @@ -0,0 +1,311 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / C4TabbedHeader + +# Class: C4TabbedHeader + +Defined in: [src/parser/classes/C4TabbedHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L12) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new C4TabbedHeader**(`data`): `C4TabbedHeader` + +Defined in: [src/parser/classes/C4TabbedHeader.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L28) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`C4TabbedHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/C4TabbedHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L15) + +*** + +### banner? + +> `optional` **banner**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/C4TabbedHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L16) + +*** + +### channel\_handle? + +> `optional` **channel\_handle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/C4TabbedHeader.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L24) + +*** + +### channel\_id? + +> `optional` **channel\_id**: `string` + +Defined in: [src/parser/classes/C4TabbedHeader.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L25) + +*** + +### header\_links? + +> `optional` **header\_links**: [`ChannelHeaderLinks`](ChannelHeaderLinks.md) \| [`ChannelHeaderLinksView`](ChannelHeaderLinksView.md) \| `null` + +Defined in: [src/parser/classes/C4TabbedHeader.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L23) + +*** + +### mobile\_banner? + +> `optional` **mobile\_banner**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/C4TabbedHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L18) + +*** + +### sponsor\_button? + +> `optional` **sponsor\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/C4TabbedHeader.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L21) + +*** + +### subscribe\_button? + +> `optional` **subscribe\_button**: [`Button`](Button.md) \| [`SubscribeButton`](SubscribeButton.md) \| `null` + +Defined in: [src/parser/classes/C4TabbedHeader.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L22) + +*** + +### subscribers? + +> `optional` **subscribers**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/C4TabbedHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L19) + +*** + +### tagline? + +> `optional` **tagline**: [`ChannelTagline`](ChannelTagline.md) \| `null` + +Defined in: [src/parser/classes/C4TabbedHeader.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L26) + +*** + +### tv\_banner? + +> `optional` **tv\_banner**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/C4TabbedHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L17) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### videos\_count? + +> `optional` **videos\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/C4TabbedHeader.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L20) + +*** + +### type + +> `static` **type**: `string` = `'C4TabbedHeader'` + +Defined in: [src/parser/classes/C4TabbedHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/C4TabbedHeader.ts#L13) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is C4TabbedHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is C4TabbedHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CallToActionButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CallToActionButton.md new file mode 100644 index 00000000..c3e46056 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CallToActionButton.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CallToActionButton + +# Class: CallToActionButton + +Defined in: [src/parser/classes/CallToActionButton.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CallToActionButton.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CallToActionButton**(`data`): `CallToActionButton` + +Defined in: [src/parser/classes/CallToActionButton.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CallToActionButton.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CallToActionButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/CallToActionButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CallToActionButton.ts#L9) + +*** + +### label + +> **label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CallToActionButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CallToActionButton.ts#L8) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/CallToActionButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CallToActionButton.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CallToActionButton'` + +Defined in: [src/parser/classes/CallToActionButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CallToActionButton.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CallToActionButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CallToActionButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Card.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Card.md new file mode 100644 index 00000000..ee988423 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Card.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Card + +# Class: Card + +Defined in: [src/parser/classes/Card.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Card.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Card**(`data`): `Card` + +Defined in: [src/parser/classes/Card.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Card.ts#L19) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Card` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### card\_id? + +> `optional` **card\_id**: `string` + +Defined in: [src/parser/classes/Card.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Card.ts#L9) + +*** + +### content + +> **content**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/Card.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Card.ts#L8) + +*** + +### cue\_ranges + +> **cue\_ranges**: `object`[] + +Defined in: [src/parser/classes/Card.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Card.ts#L12) + +#### end\_card\_active\_ms + +> **end\_card\_active\_ms**: `string` + +#### icon\_after\_teaser\_ms + +> **icon\_after\_teaser\_ms**: `string` + +#### start\_card\_active\_ms + +> **start\_card\_active\_ms**: `string` + +#### teaser\_duration\_ms + +> **teaser\_duration\_ms**: `string` + +*** + +### feature? + +> `optional` **feature**: `string` + +Defined in: [src/parser/classes/Card.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Card.ts#L10) + +*** + +### teaser + +> **teaser**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/Card.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Card.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Card'` + +Defined in: [src/parser/classes/Card.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Card.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Card & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Card & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CardCollection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CardCollection.md new file mode 100644 index 00000000..49995dd0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CardCollection.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CardCollection + +# Class: CardCollection + +Defined in: [src/parser/classes/CardCollection.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CardCollection.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CardCollection**(`data`): `CardCollection` + +Defined in: [src/parser/classes/CardCollection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CardCollection.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CardCollection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### allow\_teaser\_dismiss + +> **allow\_teaser\_dismiss**: `boolean` + +Defined in: [src/parser/classes/CardCollection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CardCollection.ts#L10) + +*** + +### cards + +> **cards**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/CardCollection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CardCollection.ts#L8) + +*** + +### header + +> **header**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CardCollection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CardCollection.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CardCollection'` + +Defined in: [src/parser/classes/CardCollection.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CardCollection.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CardCollection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CardCollection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/CarouselHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselHeader.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/CarouselHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselHeader.md index 96292ac1..4fc27aea 100644 --- a/docs/api/namespaces/YTNodes/classes/CarouselHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / CarouselHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CarouselHeader # Class: CarouselHeader +Defined in: [src/parser/classes/CarouselHeader.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselHeader.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new CarouselHeader() +### Constructor -> **new CarouselHeader**(`data`): [`CarouselHeader`](CarouselHeader.md) +> **new CarouselHeader**(`data`): `CarouselHeader` + +Defined in: [src/parser/classes/CarouselHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselHeader.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`CarouselHeader`](CarouselHeader.md) +`CarouselHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/CarouselHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CarouselHeader.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/CarouselHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CarouselHeader.ts#L7) +Defined in: [src/parser/classes/CarouselHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselHeader.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'CarouselHeader'` +Defined in: [src/parser/classes/CarouselHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselHeader.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/CarouselHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CarouselHeader.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is CarouselHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselItem.md new file mode 100644 index 00000000..66d1abf8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselItem.md @@ -0,0 +1,269 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CarouselItem + +# Class: CarouselItem + +Defined in: [src/parser/classes/CarouselItem.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CarouselItem**(`data`): `CarouselItem` + +Defined in: [src/parser/classes/CarouselItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CarouselItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### background\_color + +> **background\_color**: `string` + +Defined in: [src/parser/classes/CarouselItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L9) + +*** + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/CarouselItem.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L8) + +*** + +### layout\_style + +> **layout\_style**: `string` + +Defined in: [src/parser/classes/CarouselItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L10) + +*** + +### pagination\_thumbnails + +> **pagination\_thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CarouselItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L11) + +*** + +### paginator\_alignment + +> **paginator\_alignment**: `string` + +Defined in: [src/parser/classes/CarouselItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CarouselItem'` + +Defined in: [src/parser/classes/CarouselItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/CarouselItem.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItem.ts#L24) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CarouselItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CarouselItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselItemView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselItemView.md new file mode 100644 index 00000000..fafe47c0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselItemView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CarouselItemView + +# Class: CarouselItemView + +Defined in: [src/parser/classes/CarouselItemView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItemView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CarouselItemView**(`data`): `CarouselItemView` + +Defined in: [src/parser/classes/CarouselItemView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItemView.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CarouselItemView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### carousel\_item + +> **carousel\_item**: [`TextCarouselItemView`](TextCarouselItemView.md) \| `null` + +Defined in: [src/parser/classes/CarouselItemView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItemView.ts#L9) + +*** + +### item\_type + +> **item\_type**: `string` + +Defined in: [src/parser/classes/CarouselItemView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItemView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CarouselItemView'` + +Defined in: [src/parser/classes/CarouselItemView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselItemView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CarouselItemView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CarouselItemView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselLockup.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselLockup.md new file mode 100644 index 00000000..4e2a806b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselLockup.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CarouselLockup + +# Class: CarouselLockup + +Defined in: [src/parser/classes/CarouselLockup.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselLockup.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CarouselLockup**(`data`): `CarouselLockup` + +Defined in: [src/parser/classes/CarouselLockup.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselLockup.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CarouselLockup` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### info\_rows + +> **info\_rows**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`InfoRow`](InfoRow.md)\> + +Defined in: [src/parser/classes/CarouselLockup.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselLockup.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_lockup? + +> `optional` **video\_lockup**: [`CompactVideo`](CompactVideo.md) \| `null` + +Defined in: [src/parser/classes/CarouselLockup.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselLockup.ts#L10) + +*** + +### type + +> `static` **type**: `string` = `'CarouselLockup'` + +Defined in: [src/parser/classes/CarouselLockup.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselLockup.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CarouselLockup & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CarouselLockup & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselTitleView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselTitleView.md new file mode 100644 index 00000000..0f8cb0c9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CarouselTitleView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CarouselTitleView + +# Class: CarouselTitleView + +Defined in: [src/parser/classes/CarouselTitleView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselTitleView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CarouselTitleView**(`data`): `CarouselTitleView` + +Defined in: [src/parser/classes/CarouselTitleView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselTitleView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CarouselTitleView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### next\_button + +> **next\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/CarouselTitleView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselTitleView.ts#L10) + +*** + +### previous\_button + +> **previous\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/CarouselTitleView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselTitleView.ts#L9) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/CarouselTitleView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselTitleView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CarouselTitleView'` + +Defined in: [src/parser/classes/CarouselTitleView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CarouselTitleView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CarouselTitleView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CarouselTitleView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChangeEngagementPanelVisibilityAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChangeEngagementPanelVisibilityAction.md new file mode 100644 index 00000000..dc20666c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChangeEngagementPanelVisibilityAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChangeEngagementPanelVisibilityAction + +# Class: ChangeEngagementPanelVisibilityAction + +Defined in: [src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChangeEngagementPanelVisibilityAction**(`data`): `ChangeEngagementPanelVisibilityAction` + +Defined in: [src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChangeEngagementPanelVisibilityAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### visibility + +> **visibility**: `string` + +Defined in: [src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts#L8) + +*** + +### type + +> `static` **type**: `string` = `'ChangeEngagementPanelVisibilityAction'` + +Defined in: [src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/ChangeEngagementPanelVisibilityAction.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChangeEngagementPanelVisibilityAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChangeEngagementPanelVisibilityAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Channel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Channel.md new file mode 100644 index 00000000..b0aaed26 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Channel.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Channel + +# Class: Channel + +Defined in: [src/parser/classes/Channel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Channel**(`data`): `Channel` + +Defined in: [src/parser/classes/Channel.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L22) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Channel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/Channel.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L13) + +*** + +### description\_snippet + +> **description\_snippet**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Channel.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L20) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Channel.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L18) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/Channel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L12) + +*** + +### long\_byline + +> **long\_byline**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Channel.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L16) + +*** + +### short\_byline + +> **short\_byline**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Channel.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L17) + +*** + +### subscribe\_button + +> **subscribe\_button**: [`Button`](Button.md) \| [`SubscribeButton`](SubscribeButton.md) \| `null` + +Defined in: [src/parser/classes/Channel.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L19) + +*** + +### subscriber\_count + +> **subscriber\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Channel.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Channel.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L15) + +*** + +### type + +> `static` **type**: `string` = `'Channel'` + +Defined in: [src/parser/classes/Channel.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Channel.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Channel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Channel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelAboutFullMetadata.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelAboutFullMetadata.md new file mode 100644 index 00000000..2baaa77a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelAboutFullMetadata.md @@ -0,0 +1,323 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelAboutFullMetadata + +# Class: ChannelAboutFullMetadata + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelAboutFullMetadata**(`data`): `ChannelAboutFullMetadata` + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L30) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelAboutFullMetadata` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### avatar + +> **avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L13) + +*** + +### buttons + +> **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md)\> + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L28) + +*** + +### can\_reveal\_email + +> **can\_reveal\_email**: `boolean` + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L26) + +*** + +### canonical\_channel\_url + +> **canonical\_channel\_url**: `string` + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L14) + +*** + +### country + +> **country**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L27) + +*** + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L24) + +*** + +### email\_reveal + +> **email\_reveal**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L25) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L11) + +*** + +### joined\_date + +> **joined\_date**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L23) + +*** + +### name + +> **name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L12) + +*** + +### primary\_links + +> **primary\_links**: `object`[] + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L16) + +#### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### icon + +> **icon**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +#### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_count + +> **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L22) + +*** + +### type + +> `static` **type**: `string` = `'ChannelAboutFullMetadata'` + +Defined in: [src/parser/classes/ChannelAboutFullMetadata.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAboutFullMetadata.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelAboutFullMetadata & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelAboutFullMetadata & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelAgeGate.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelAgeGate.md new file mode 100644 index 00000000..4a93362a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelAgeGate.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelAgeGate + +# Class: ChannelAgeGate + +Defined in: [src/parser/classes/ChannelAgeGate.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelAgeGate**(`data`): `ChannelAgeGate` + +Defined in: [src/parser/classes/ChannelAgeGate.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelAgeGate` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### avatar + +> **avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ChannelAgeGate.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L12) + +*** + +### channel\_title + +> **channel\_title**: `string` + +Defined in: [src/parser/classes/ChannelAgeGate.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L11) + +*** + +### header + +> **header**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelAgeGate.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L13) + +*** + +### main\_text + +> **main\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelAgeGate.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L14) + +*** + +### secondary\_text + +> **secondary\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelAgeGate.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L16) + +*** + +### sign\_in\_button + +> **sign\_in\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ChannelAgeGate.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelAgeGate'` + +Defined in: [src/parser/classes/ChannelAgeGate.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelAgeGate.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelAgeGate & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelAgeGate & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelExternalLinkView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelExternalLinkView.md new file mode 100644 index 00000000..2ede7b48 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelExternalLinkView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelExternalLinkView + +# Class: ChannelExternalLinkView + +Defined in: [src/parser/classes/ChannelExternalLinkView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelExternalLinkView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelExternalLinkView**(`data`): `ChannelExternalLinkView` + +Defined in: [src/parser/classes/ChannelExternalLinkView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelExternalLinkView.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelExternalLinkView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### favicon + +> **favicon**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ChannelExternalLinkView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelExternalLinkView.ts#L11) + +*** + +### link + +> **link**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelExternalLinkView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelExternalLinkView.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelExternalLinkView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelExternalLinkView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelExternalLinkView'` + +Defined in: [src/parser/classes/ChannelExternalLinkView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelExternalLinkView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelExternalLinkView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelExternalLinkView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ChannelFeaturedContent.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelFeaturedContent.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ChannelFeaturedContent.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelFeaturedContent.md index 99a6f0e0..d69a170c 100644 --- a/docs/api/namespaces/YTNodes/classes/ChannelFeaturedContent.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelFeaturedContent.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ChannelFeaturedContent +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelFeaturedContent # Class: ChannelFeaturedContent +Defined in: [src/parser/classes/ChannelFeaturedContent.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelFeaturedContent.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ChannelFeaturedContent() +### Constructor -> **new ChannelFeaturedContent**(`data`): [`ChannelFeaturedContent`](ChannelFeaturedContent.md) +> **new ChannelFeaturedContent**(`data`): `ChannelFeaturedContent` + +Defined in: [src/parser/classes/ChannelFeaturedContent.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelFeaturedContent.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ChannelFeaturedContent`](ChannelFeaturedContent.md) +`ChannelFeaturedContent` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ChannelFeaturedContent.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelFeaturedContent.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/ChannelFeaturedContent.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelFeaturedContent.ts#L9) +Defined in: [src/parser/classes/ChannelFeaturedContent.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelFeaturedContent.ts#L9) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/ChannelFeaturedContent.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelFeaturedContent.ts#L8) +Defined in: [src/parser/classes/ChannelFeaturedContent.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelFeaturedContent.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ChannelFeaturedContent'` +Defined in: [src/parser/classes/ChannelFeaturedContent.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelFeaturedContent.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ChannelFeaturedContent.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelFeaturedContent.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ChannelFeaturedContent & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/ChannelHeaderLinks.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelHeaderLinks.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ChannelHeaderLinks.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelHeaderLinks.md index 4ea3abf4..b15a5887 100644 --- a/docs/api/namespaces/YTNodes/classes/ChannelHeaderLinks.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelHeaderLinks.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ChannelHeaderLinks +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelHeaderLinks # Class: ChannelHeaderLinks +Defined in: [src/parser/classes/ChannelHeaderLinks.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinks.ts#L23) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ChannelHeaderLinks() +### Constructor -> **new ChannelHeaderLinks**(`data`): [`ChannelHeaderLinks`](ChannelHeaderLinks.md) +> **new ChannelHeaderLinks**(`data`): `ChannelHeaderLinks` + +Defined in: [src/parser/classes/ChannelHeaderLinks.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinks.ts#L29) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ChannelHeaderLinks`](ChannelHeaderLinks.md) +`ChannelHeaderLinks` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ChannelHeaderLinks.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelHeaderLinks.ts#L29) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **primary**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`HeaderLink`\> -#### Defined in - -[src/parser/classes/ChannelHeaderLinks.ts:26](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelHeaderLinks.ts#L26) +Defined in: [src/parser/classes/ChannelHeaderLinks.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinks.ts#L26) *** @@ -44,9 +44,7 @@ > **secondary**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`HeaderLink`\> -#### Defined in - -[src/parser/classes/ChannelHeaderLinks.ts:27](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelHeaderLinks.ts#L27) +Defined in: [src/parser/classes/ChannelHeaderLinks.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinks.ts#L27) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ChannelHeaderLinks'` +Defined in: [src/parser/classes/ChannelHeaderLinks.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinks.ts#L24) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ChannelHeaderLinks.ts:24](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelHeaderLinks.ts#L24) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ChannelHeaderLinks & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelHeaderLinksView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelHeaderLinksView.md new file mode 100644 index 00000000..b16d8bfe --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelHeaderLinksView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelHeaderLinksView + +# Class: ChannelHeaderLinksView + +Defined in: [src/parser/classes/ChannelHeaderLinksView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinksView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelHeaderLinksView**(`data`): `ChannelHeaderLinksView` + +Defined in: [src/parser/classes/ChannelHeaderLinksView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinksView.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelHeaderLinksView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### first\_link? + +> `optional` **first\_link**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelHeaderLinksView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinksView.ts#L8) + +*** + +### more? + +> `optional` **more**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelHeaderLinksView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinksView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelHeaderLinksView'` + +Defined in: [src/parser/classes/ChannelHeaderLinksView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelHeaderLinksView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelHeaderLinksView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelHeaderLinksView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelMetadata.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelMetadata.md new file mode 100644 index 00000000..3ca27dfd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelMetadata.md @@ -0,0 +1,327 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelMetadata + +# Class: ChannelMetadata + +Defined in: [src/parser/classes/ChannelMetadata.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelMetadata**(`data`): `ChannelMetadata` + +Defined in: [src/parser/classes/ChannelMetadata.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelMetadata` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### android\_appindexing\_link + +> **android\_appindexing\_link**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L20) + +*** + +### android\_deep\_link + +> **android\_deep\_link**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L19) + +*** + +### available\_countries + +> **available\_countries**: `string`[] + +Defined in: [src/parser/classes/ChannelMetadata.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L18) + +*** + +### avatar + +> **avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ChannelMetadata.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L16) + +*** + +### description + +> **description**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L9) + +*** + +### external\_id + +> **external\_id**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L13) + +*** + +### ios\_appindexing\_link + +> **ios\_appindexing\_link**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L21) + +*** + +### is\_family\_safe + +> **is\_family\_safe**: `boolean` + +Defined in: [src/parser/classes/ChannelMetadata.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L14) + +*** + +### keywords + +> **keywords**: `string`[] + +Defined in: [src/parser/classes/ChannelMetadata.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L15) + +*** + +### music\_artist\_name? + +> `optional` **music\_artist\_name**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L17) + +*** + +### rss\_url + +> **rss\_url**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L11) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### url + +> **url**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L10) + +*** + +### vanity\_channel\_url + +> **vanity\_channel\_url**: `string` + +Defined in: [src/parser/classes/ChannelMetadata.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'ChannelMetadata'` + +Defined in: [src/parser/classes/ChannelMetadata.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMetadata.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelMetadata & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelMetadata & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ChannelMobileHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelMobileHeader.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ChannelMobileHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelMobileHeader.md index 94e23913..a6f0526a 100644 --- a/docs/api/namespaces/YTNodes/classes/ChannelMobileHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelMobileHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ChannelMobileHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelMobileHeader # Class: ChannelMobileHeader +Defined in: [src/parser/classes/ChannelMobileHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMobileHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ChannelMobileHeader() +### Constructor -> **new ChannelMobileHeader**(`data`): [`ChannelMobileHeader`](ChannelMobileHeader.md) +> **new ChannelMobileHeader**(`data`): `ChannelMobileHeader` + +Defined in: [src/parser/classes/ChannelMobileHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMobileHeader.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ChannelMobileHeader`](ChannelMobileHeader.md) +`ChannelMobileHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ChannelMobileHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelMobileHeader.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/ChannelMobileHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelMobileHeader.ts#L8) +Defined in: [src/parser/classes/ChannelMobileHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMobileHeader.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ChannelMobileHeader'` +Defined in: [src/parser/classes/ChannelMobileHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelMobileHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ChannelMobileHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChannelMobileHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ChannelMobileHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelOptions.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelOptions.md new file mode 100644 index 00000000..697867c3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelOptions.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelOptions + +# Class: ChannelOptions + +Defined in: [src/parser/classes/ChannelOptions.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOptions.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelOptions**(`data`): `ChannelOptions` + +Defined in: [src/parser/classes/ChannelOptions.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOptions.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelOptions` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### avatar + +> **avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ChannelOptions.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOptions.ts#L10) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ChannelOptions.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOptions.ts#L11) + +*** + +### links + +> **links**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/ChannelOptions.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOptions.ts#L13) + +*** + +### name + +> **name**: `string` + +Defined in: [src/parser/classes/ChannelOptions.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOptions.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelOptions'` + +Defined in: [src/parser/classes/ChannelOptions.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOptions.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelOptions & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelOptions & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelOwnerEmptyState.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelOwnerEmptyState.md new file mode 100644 index 00000000..22a6d0b0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelOwnerEmptyState.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelOwnerEmptyState + +# Class: ChannelOwnerEmptyState + +Defined in: [src/parser/classes/ChannelOwnerEmptyState.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOwnerEmptyState.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelOwnerEmptyState**(`data`): `ChannelOwnerEmptyState` + +Defined in: [src/parser/classes/ChannelOwnerEmptyState.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOwnerEmptyState.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelOwnerEmptyState` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelOwnerEmptyState.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOwnerEmptyState.ts#L10) + +*** + +### illustration + +> **illustration**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ChannelOwnerEmptyState.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOwnerEmptyState.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelOwnerEmptyState'` + +Defined in: [src/parser/classes/ChannelOwnerEmptyState.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelOwnerEmptyState.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelOwnerEmptyState & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelOwnerEmptyState & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSubMenu.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSubMenu.md new file mode 100644 index 00000000..1d863251 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSubMenu.md @@ -0,0 +1,243 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelSubMenu + +# Class: ChannelSubMenu + +Defined in: [src/parser/classes/ChannelSubMenu.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSubMenu.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelSubMenu**(`data`): `ChannelSubMenu` + +Defined in: [src/parser/classes/ChannelSubMenu.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSubMenu.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelSubMenu` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content\_type\_sub\_menu\_items + +> **content\_type\_sub\_menu\_items**: `object`[] + +Defined in: [src/parser/classes/ChannelSubMenu.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSubMenu.ts#L8) + +#### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### selected + +> **selected**: `boolean` + +#### title + +> **title**: `string` + +*** + +### sort\_setting + +> **sort\_setting**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/ChannelSubMenu.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSubMenu.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelSubMenu'` + +Defined in: [src/parser/classes/ChannelSubMenu.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSubMenu.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelSubMenu & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelSubMenu & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSwitcherHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSwitcherHeader.md new file mode 100644 index 00000000..1ceae878 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSwitcherHeader.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelSwitcherHeader + +# Class: ChannelSwitcherHeader + +Defined in: [src/parser/classes/ChannelSwitcherHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherHeader.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelSwitcherHeader**(`data`): `ChannelSwitcherHeader` + +Defined in: [src/parser/classes/ChannelSwitcherHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherHeader.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelSwitcherHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button? + +> `optional` **button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ChannelSwitcherHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherHeader.ts#L10) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/ChannelSwitcherHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherHeader.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelSwitcherHeader'` + +Defined in: [src/parser/classes/ChannelSwitcherHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherHeader.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelSwitcherHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelSwitcherHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSwitcherPage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSwitcherPage.md new file mode 100644 index 00000000..eb951d13 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelSwitcherPage.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelSwitcherPage + +# Class: ChannelSwitcherPage + +Defined in: [src/parser/classes/ChannelSwitcherPage.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherPage.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelSwitcherPage**(`data`): `ChannelSwitcherPage` + +Defined in: [src/parser/classes/ChannelSwitcherPage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherPage.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelSwitcherPage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> \| `null` + +Defined in: [src/parser/classes/ChannelSwitcherPage.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherPage.ts#L9) + +*** + +### header + +> **header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/ChannelSwitcherPage.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherPage.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelSwitcherPage'` + +Defined in: [src/parser/classes/ChannelSwitcherPage.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelSwitcherPage.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelSwitcherPage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelSwitcherPage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelTagline.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelTagline.md new file mode 100644 index 00000000..49e407fc --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelTagline.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelTagline + +# Class: ChannelTagline + +Defined in: [src/parser/classes/ChannelTagline.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelTagline**(`data`): `ChannelTagline` + +Defined in: [src/parser/classes/ChannelTagline.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L25) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelTagline` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: `string` + +Defined in: [src/parser/classes/ChannelTagline.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L9) + +*** + +### max\_lines + +> **max\_lines**: `number` + +Defined in: [src/parser/classes/ChannelTagline.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L10) + +*** + +### more\_endpoint + +> **more\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) \| \{ `show_engagement_panel_endpoint`: \{ `engagement_panel`: [`EngagementPanelSectionList`](EngagementPanelSectionList.md) \| `null`; `engagement_panel_popup_type`: `string`; `identifier`: \{ `surface`: `string`; `tag`: `string`; \}; \}; \} + +Defined in: [src/parser/classes/ChannelTagline.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L11) + +*** + +### more\_icon\_type + +> **more\_icon\_type**: `string` + +Defined in: [src/parser/classes/ChannelTagline.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L21) + +*** + +### more\_label + +> **more\_label**: `string` + +Defined in: [src/parser/classes/ChannelTagline.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L22) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/ChannelTagline.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L23) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelTagline'` + +Defined in: [src/parser/classes/ChannelTagline.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelTagline.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelTagline & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelTagline & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelThumbnailWithLink.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelThumbnailWithLink.md new file mode 100644 index 00000000..ed3b74bd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelThumbnailWithLink.md @@ -0,0 +1,253 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelThumbnailWithLink + +# Class: ChannelThumbnailWithLink + +Defined in: [src/parser/classes/ChannelThumbnailWithLink.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelThumbnailWithLink.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelThumbnailWithLink**(`data`): `ChannelThumbnailWithLink` + +Defined in: [src/parser/classes/ChannelThumbnailWithLink.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelThumbnailWithLink.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelThumbnailWithLink` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/ChannelThumbnailWithLink.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelThumbnailWithLink.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ChannelThumbnailWithLink.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelThumbnailWithLink.ts#L11) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ChannelThumbnailWithLink.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelThumbnailWithLink.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChannelThumbnailWithLink'` + +Defined in: [src/parser/classes/ChannelThumbnailWithLink.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelThumbnailWithLink.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### label + +#### Get Signature + +> **get** **label**(): `string` \| `undefined` + +Defined in: [src/parser/classes/ChannelThumbnailWithLink.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelThumbnailWithLink.ts#L27) + +##### Returns + +`string` \| `undefined` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelThumbnailWithLink & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelThumbnailWithLink & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelVideoPlayer.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelVideoPlayer.md new file mode 100644 index 00000000..1524cbca --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChannelVideoPlayer.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChannelVideoPlayer + +# Class: ChannelVideoPlayer + +Defined in: [src/parser/classes/ChannelVideoPlayer.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelVideoPlayer.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChannelVideoPlayer**(`data`): `ChannelVideoPlayer` + +Defined in: [src/parser/classes/ChannelVideoPlayer.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelVideoPlayer.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChannelVideoPlayer` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelVideoPlayer.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelVideoPlayer.ts#L10) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/ChannelVideoPlayer.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelVideoPlayer.ts#L8) + +*** + +### published\_time + +> **published\_time**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelVideoPlayer.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelVideoPlayer.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelVideoPlayer.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelVideoPlayer.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_count + +> **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChannelVideoPlayer.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelVideoPlayer.ts#L11) + +*** + +### type + +> `static` **type**: `string` = `'ChannelVideoPlayer'` + +Defined in: [src/parser/classes/ChannelVideoPlayer.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChannelVideoPlayer.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChannelVideoPlayer & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChannelVideoPlayer & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Chapter.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Chapter.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/Chapter.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Chapter.md index 29865655..e6eca800 100644 --- a/docs/api/namespaces/YTNodes/classes/Chapter.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Chapter.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Chapter +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Chapter # Class: Chapter +Defined in: [src/parser/classes/Chapter.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Chapter.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Chapter() +### Constructor -> **new Chapter**(`data`): [`Chapter`](Chapter.md) +> **new Chapter**(`data`): `Chapter` + +Defined in: [src/parser/classes/Chapter.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Chapter.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Chapter`](Chapter.md) +`Chapter` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Chapter.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Chapter.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/Chapter.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Chapter.ts#L11) +Defined in: [src/parser/classes/Chapter.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Chapter.ts#L11) *** @@ -44,9 +44,7 @@ > **time\_range\_start\_millis**: `number` -#### Defined in - -[src/parser/classes/Chapter.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Chapter.ts#L10) +Defined in: [src/parser/classes/Chapter.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Chapter.ts#L10) *** @@ -54,9 +52,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/Chapter.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Chapter.ts#L9) +Defined in: [src/parser/classes/Chapter.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Chapter.ts#L9) *** @@ -64,45 +60,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Chapter'` +Defined in: [src/parser/classes/Chapter.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Chapter.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Chapter.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Chapter.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -120,27 +120,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Chapter & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -154,27 +158,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -188,27 +196,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -225,7 +237,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChildVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChildVideo.md new file mode 100644 index 00000000..c41576d9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChildVideo.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChildVideo + +# Class: ChildVideo + +Defined in: [src/parser/classes/ChildVideo.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChildVideo.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChildVideo**(`data`): `ChildVideo` + +Defined in: [src/parser/classes/ChildVideo.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChildVideo.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChildVideo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### duration + +> **duration**: `object` + +Defined in: [src/parser/classes/ChildVideo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChildVideo.ts#L13) + +#### seconds + +> **seconds**: `number` + +#### text + +> **text**: `string` + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ChildVideo.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChildVideo.ts#L18) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/ChildVideo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChildVideo.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ChildVideo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChildVideo.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChildVideo'` + +Defined in: [src/parser/classes/ChildVideo.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChildVideo.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChildVideo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChildVideo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ChipBarView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipBarView.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/ChipBarView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ChipBarView.md index 8daf688d..15fe730d 100644 --- a/docs/api/namespaces/YTNodes/classes/ChipBarView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipBarView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ChipBarView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChipBarView # Class: ChipBarView +Defined in: [src/parser/classes/ChipBarView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipBarView.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ChipBarView() +### Constructor -> **new ChipBarView**(`data`): [`ChipBarView`](ChipBarView.md) +> **new ChipBarView**(`data`): `ChipBarView` + +Defined in: [src/parser/classes/ChipBarView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipBarView.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ChipBarView`](ChipBarView.md) +`ChipBarView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ChipBarView.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChipBarView.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **chips**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipView`](ChipView.md)\> -#### Defined in - -[src/parser/classes/ChipBarView.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChipBarView.ts#L8) +Defined in: [src/parser/classes/ChipBarView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipBarView.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ChipBarView'` +Defined in: [src/parser/classes/ChipBarView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipBarView.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ChipBarView.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ChipBarView.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ChipBarView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipCloud.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipCloud.md new file mode 100644 index 00000000..efe01a2e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipCloud.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChipCloud + +# Class: ChipCloud + +Defined in: [src/parser/classes/ChipCloud.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloud.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChipCloud**(`data`): `ChipCloud` + +Defined in: [src/parser/classes/ChipCloud.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloud.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChipCloud` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### chips + +> **chips**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](ChipCloudChip.md)\> + +Defined in: [src/parser/classes/ChipCloud.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloud.ts#L9) + +*** + +### horizontal\_scrollable + +> **horizontal\_scrollable**: `boolean` + +Defined in: [src/parser/classes/ChipCloud.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloud.ts#L12) + +*** + +### next\_button + +> **next\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ChipCloud.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloud.ts#L10) + +*** + +### previous\_button + +> **previous\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ChipCloud.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloud.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChipCloud'` + +Defined in: [src/parser/classes/ChipCloud.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloud.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChipCloud & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChipCloud & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipCloudChip.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipCloudChip.md new file mode 100644 index 00000000..d857b5b7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipCloudChip.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChipCloudChip + +# Class: ChipCloudChip + +Defined in: [src/parser/classes/ChipCloudChip.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloudChip.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChipCloudChip**(`data`): `ChipCloudChip` + +Defined in: [src/parser/classes/ChipCloudChip.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloudChip.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChipCloudChip` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ChipCloudChip.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloudChip.ts#L10) + +*** + +### is\_selected + +> **is\_selected**: `boolean` + +Defined in: [src/parser/classes/ChipCloudChip.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloudChip.ts#L9) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/ChipCloudChip.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloudChip.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChipCloudChip'` + +Defined in: [src/parser/classes/ChipCloudChip.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipCloudChip.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChipCloudChip & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChipCloudChip & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipView.md new file mode 100644 index 00000000..aba55351 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ChipView.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ChipView + +# Class: ChipView + +Defined in: [src/parser/classes/ChipView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ChipView**(`data`): `ChipView` + +Defined in: [src/parser/classes/ChipView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipView.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ChipView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### chip\_entity\_key + +> **chip\_entity\_key**: `string` + +Defined in: [src/parser/classes/ChipView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipView.ts#L11) + +*** + +### display\_type + +> **display\_type**: `string` + +Defined in: [src/parser/classes/ChipView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipView.ts#L9) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ChipView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipView.ts#L10) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/ChipView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ChipView'` + +Defined in: [src/parser/classes/ChipView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ChipView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ChipView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ChipView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ClientSideToggleMenuItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClientSideToggleMenuItem.md new file mode 100644 index 00000000..152d080c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClientSideToggleMenuItem.md @@ -0,0 +1,291 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ClientSideToggleMenuItem + +# Class: ClientSideToggleMenuItem + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ClientSideToggleMenuItem**(`data`): `ClientSideToggleMenuItem` + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ClientSideToggleMenuItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L15) + +*** + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L10) + +*** + +### is\_toggled? + +> `optional` **is\_toggled**: `boolean` + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L13) + +*** + +### logging\_directives? + +> `optional` **logging\_directives**: `object` + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L16) + +#### enable\_displaylogger\_experiment + +> **enable\_displaylogger\_experiment**: `boolean` + +#### visibility + +> **visibility**: `object` + +##### visibility.types + +> **types**: `string` + +*** + +### menu\_item\_identifier + +> **menu\_item\_identifier**: `string` + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L14) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L9) + +*** + +### toggled\_icon\_type + +> **toggled\_icon\_type**: `string` + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L12) + +*** + +### toggled\_text + +> **toggled\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ClientSideToggleMenuItem'` + +Defined in: [src/parser/classes/ClientSideToggleMenuItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClientSideToggleMenuItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ClientSideToggleMenuItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ClientSideToggleMenuItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ClipAdState.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipAdState.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ClipAdState.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ClipAdState.md index 8cf6f755..cbeb63be 100644 --- a/docs/api/namespaces/YTNodes/classes/ClipAdState.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipAdState.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ClipAdState +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ClipAdState # Class: ClipAdState +Defined in: [src/parser/classes/ClipAdState.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipAdState.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ClipAdState() +### Constructor -> **new ClipAdState**(`data`): [`ClipAdState`](ClipAdState.md) +> **new ClipAdState**(`data`): `ClipAdState` + +Defined in: [src/parser/classes/ClipAdState.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipAdState.ts#L12) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ClipAdState`](ClipAdState.md) +`ClipAdState` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ClipAdState.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ClipAdState.ts#L12) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **body**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/ClipAdState.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ClipAdState.ts#L10) +Defined in: [src/parser/classes/ClipAdState.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipAdState.ts#L10) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/ClipAdState.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ClipAdState.ts#L9) +Defined in: [src/parser/classes/ClipAdState.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipAdState.ts#L9) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ClipAdState'` +Defined in: [src/parser/classes/ClipAdState.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipAdState.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ClipAdState.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ClipAdState.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ClipAdState & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreation.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreation.md new file mode 100644 index 00000000..57ff86be --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreation.md @@ -0,0 +1,295 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ClipCreation + +# Class: ClipCreation + +Defined in: [src/parser/classes/ClipCreation.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L13) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ClipCreation**(`data`): `ClipCreation` + +Defined in: [src/parser/classes/ClipCreation.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L27) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ClipCreation` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### ad\_state\_overlay + +> **ad\_state\_overlay**: [`ClipAdState`](ClipAdState.md) \| `null` + +Defined in: [src/parser/classes/ClipCreation.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L23) + +*** + +### cancel\_button + +> **cancel\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ClipCreation.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L22) + +*** + +### display\_name + +> **display\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ClipCreation.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L20) + +*** + +### external\_video\_id + +> **external\_video\_id**: `string` + +Defined in: [src/parser/classes/ClipCreation.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L24) + +*** + +### publicity\_label + +> **publicity\_label**: `string` + +Defined in: [src/parser/classes/ClipCreation.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L21) + +*** + +### publicity\_label\_icon + +> **publicity\_label\_icon**: `string` + +Defined in: [src/parser/classes/ClipCreation.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L25) + +*** + +### save\_button + +> **save\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ClipCreation.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L19) + +*** + +### scrubber + +> **scrubber**: [`ClipCreationScrubber`](ClipCreationScrubber.md) \| `null` + +Defined in: [src/parser/classes/ClipCreation.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L18) + +*** + +### title\_input + +> **title\_input**: [`ClipCreationTextInput`](ClipCreationTextInput.md) \| `null` + +Defined in: [src/parser/classes/ClipCreation.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L17) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### user\_avatar + +> **user\_avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ClipCreation.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L16) + +*** + +### type + +> `static` **type**: `string` = `'ClipCreation'` + +Defined in: [src/parser/classes/ClipCreation.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreation.ts#L14) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ClipCreation & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ClipCreation & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreationScrubber.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreationScrubber.md new file mode 100644 index 00000000..cb1b613a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreationScrubber.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ClipCreationScrubber + +# Class: ClipCreationScrubber + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ClipCreationScrubber**(`data`): `ClipCreationScrubber` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ClipCreationScrubber` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### default\_length\_ms + +> **default\_length\_ms**: `number` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L11) + +*** + +### duration\_label? + +> `optional` **duration\_label**: `string` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L15) + +*** + +### end\_label? + +> `optional` **end\_label**: `string` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L14) + +*** + +### length\_template + +> **length\_template**: `string` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L8) + +*** + +### max\_length\_ms + +> **max\_length\_ms**: `number` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L9) + +*** + +### min\_length\_ms + +> **min\_length\_ms**: `number` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L10) + +*** + +### start\_label? + +> `optional` **start\_label**: `string` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### window\_size\_ms + +> **window\_size\_ms**: `number` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'ClipCreationScrubber'` + +Defined in: [src/parser/classes/ClipCreationScrubber.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationScrubber.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ClipCreationScrubber & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ClipCreationScrubber & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreationTextInput.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreationTextInput.md new file mode 100644 index 00000000..5c8b812d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipCreationTextInput.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ClipCreationTextInput + +# Class: ClipCreationTextInput + +Defined in: [src/parser/classes/ClipCreationTextInput.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationTextInput.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ClipCreationTextInput**(`data`): `ClipCreationTextInput` + +Defined in: [src/parser/classes/ClipCreationTextInput.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationTextInput.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ClipCreationTextInput` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### max\_character\_limit + +> **max\_character\_limit**: `number` + +Defined in: [src/parser/classes/ClipCreationTextInput.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationTextInput.ts#L10) + +*** + +### placeholder\_text + +> **placeholder\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ClipCreationTextInput.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationTextInput.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ClipCreationTextInput'` + +Defined in: [src/parser/classes/ClipCreationTextInput.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipCreationTextInput.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ClipCreationTextInput & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ClipCreationTextInput & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipSection.md new file mode 100644 index 00000000..1d96d4c7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ClipSection.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ClipSection + +# Class: ClipSection + +Defined in: [src/parser/classes/ClipSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipSection.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ClipSection**(`data`): `ClipSection` + +Defined in: [src/parser/classes/ClipSection.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipSection.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ClipSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ClipCreation`](ClipCreation.md)\> \| `null` + +Defined in: [src/parser/classes/ClipSection.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipSection.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ClipSection'` + +Defined in: [src/parser/classes/ClipSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ClipSection.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ClipSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ClipSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CollaboratorInfoCardContent.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CollaboratorInfoCardContent.md new file mode 100644 index 00000000..e58e6220 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CollaboratorInfoCardContent.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CollaboratorInfoCardContent + +# Class: CollaboratorInfoCardContent + +Defined in: [src/parser/classes/CollaboratorInfoCardContent.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollaboratorInfoCardContent.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CollaboratorInfoCardContent**(`data`): `CollaboratorInfoCardContent` + +Defined in: [src/parser/classes/CollaboratorInfoCardContent.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollaboratorInfoCardContent.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CollaboratorInfoCardContent` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### channel\_avatar + +> **channel\_avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CollaboratorInfoCardContent.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollaboratorInfoCardContent.ts#L10) + +*** + +### channel\_name + +> **channel\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CollaboratorInfoCardContent.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollaboratorInfoCardContent.ts#L12) + +*** + +### custom\_text + +> **custom\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CollaboratorInfoCardContent.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollaboratorInfoCardContent.ts#L11) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/CollaboratorInfoCardContent.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollaboratorInfoCardContent.ts#L14) + +*** + +### subscriber\_count + +> **subscriber\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CollaboratorInfoCardContent.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollaboratorInfoCardContent.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CollaboratorInfoCardContent'` + +Defined in: [src/parser/classes/CollaboratorInfoCardContent.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollaboratorInfoCardContent.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CollaboratorInfoCardContent & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CollaboratorInfoCardContent & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CollageHeroImage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CollageHeroImage.md new file mode 100644 index 00000000..edb9cf60 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CollageHeroImage.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CollageHeroImage + +# Class: CollageHeroImage + +Defined in: [src/parser/classes/CollageHeroImage.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollageHeroImage.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CollageHeroImage**(`data`): `CollageHeroImage` + +Defined in: [src/parser/classes/CollageHeroImage.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollageHeroImage.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CollageHeroImage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### bottom\_right + +> **bottom\_right**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CollageHeroImage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollageHeroImage.ts#L11) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/CollageHeroImage.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollageHeroImage.ts#L12) + +*** + +### left + +> **left**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CollageHeroImage.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollageHeroImage.ts#L9) + +*** + +### top\_right + +> **top\_right**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CollageHeroImage.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollageHeroImage.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CollageHeroImage'` + +Defined in: [src/parser/classes/CollageHeroImage.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollageHeroImage.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CollageHeroImage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CollageHeroImage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CollectionThumbnailView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CollectionThumbnailView.md new file mode 100644 index 00000000..a36f4fcf --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CollectionThumbnailView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CollectionThumbnailView + +# Class: CollectionThumbnailView + +Defined in: [src/parser/classes/CollectionThumbnailView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollectionThumbnailView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CollectionThumbnailView**(`data`): `CollectionThumbnailView` + +Defined in: [src/parser/classes/CollectionThumbnailView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollectionThumbnailView.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CollectionThumbnailView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### primary\_thumbnail + +> **primary\_thumbnail**: [`ThumbnailView`](ThumbnailView.md) \| `null` + +Defined in: [src/parser/classes/CollectionThumbnailView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollectionThumbnailView.ts#L8) + +*** + +### stack\_color? + +> `optional` **stack\_color**: `object` + +Defined in: [src/parser/classes/CollectionThumbnailView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollectionThumbnailView.ts#L9) + +#### dark\_theme + +> **dark\_theme**: `number` + +#### light\_theme + +> **light\_theme**: `number` + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CollectionThumbnailView'` + +Defined in: [src/parser/classes/CollectionThumbnailView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CollectionThumbnailView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CollectionThumbnailView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CollectionThumbnailView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/CommandExecutorCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommandExecutorCommand.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/CommandExecutorCommand.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/CommandExecutorCommand.md index 26017f2a..4e12becb 100644 --- a/docs/api/namespaces/YTNodes/classes/CommandExecutorCommand.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommandExecutorCommand.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / CommandExecutorCommand +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommandExecutorCommand # Class: CommandExecutorCommand +Defined in: [src/parser/classes/commands/CommandExecutorCommand.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/CommandExecutorCommand.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new CommandExecutorCommand() +### Constructor -> **new CommandExecutorCommand**(`data`): [`CommandExecutorCommand`](CommandExecutorCommand.md) +> **new CommandExecutorCommand**(`data`): `CommandExecutorCommand` + +Defined in: [src/parser/classes/commands/CommandExecutorCommand.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/CommandExecutorCommand.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`CommandExecutorCommand`](CommandExecutorCommand.md) +`CommandExecutorCommand` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/commands/CommandExecutorCommand.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/commands/CommandExecutorCommand.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **commands**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/commands/CommandExecutorCommand.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/commands/CommandExecutorCommand.ts#L8) +Defined in: [src/parser/classes/commands/CommandExecutorCommand.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/CommandExecutorCommand.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'CommandExecutorCommand'` +Defined in: [src/parser/classes/commands/CommandExecutorCommand.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/CommandExecutorCommand.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/commands/CommandExecutorCommand.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/commands/CommandExecutorCommand.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is CommandExecutorCommand & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentActionButtons.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentActionButtons.md new file mode 100644 index 00000000..c1e05053 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentActionButtons.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentActionButtons + +# Class: CommentActionButtons + +Defined in: [src/parser/classes/comments/CommentActionButtons.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentActionButtons.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentActionButtons**(`data`): `CommentActionButtons` + +Defined in: [src/parser/classes/comments/CommentActionButtons.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentActionButtons.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentActionButtons` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### creator\_heart + +> **creator\_heart**: [`CreatorHeart`](CreatorHeart.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentActionButtons.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentActionButtons.ts#L15) + +*** + +### dislike\_button + +> **dislike\_button**: [`ToggleButton`](ToggleButton.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentActionButtons.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentActionButtons.ts#L13) + +*** + +### like\_button + +> **like\_button**: [`ToggleButton`](ToggleButton.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentActionButtons.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentActionButtons.ts#L12) + +*** + +### reply\_button + +> **reply\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentActionButtons.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentActionButtons.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentActionButtons'` + +Defined in: [src/parser/classes/comments/CommentActionButtons.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentActionButtons.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentActionButtons & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentActionButtons & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentDialog.md new file mode 100644 index 00000000..bf6be29f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentDialog.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentDialog + +# Class: CommentDialog + +Defined in: [src/parser/classes/comments/CommentDialog.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentDialog**(`data`): `CommentDialog` + +Defined in: [src/parser/classes/comments/CommentDialog.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_thumbnail + +> **author\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/CommentDialog.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L14) + +*** + +### cancel\_button + +> **cancel\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentDialog.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L16) + +*** + +### editable\_text + +> **editable\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentDialog.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L13) + +*** + +### emoji\_button + +> **emoji\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentDialog.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L18) + +*** + +### emoji\_picker + +> **emoji\_picker**: [`EmojiPicker`](EmojiPicker.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentDialog.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L19) + +*** + +### placeholder + +> **placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentDialog.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L17) + +*** + +### submit\_button + +> **submit\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentDialog.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentDialog'` + +Defined in: [src/parser/classes/comments/CommentDialog.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentDialog.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentReplies.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentReplies.md new file mode 100644 index 00000000..abf269dd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentReplies.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentReplies + +# Class: CommentReplies + +Defined in: [src/parser/classes/comments/CommentReplies.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplies.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentReplies**(`data`): `CommentReplies` + +Defined in: [src/parser/classes/comments/CommentReplies.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplies.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentReplies` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/comments/CommentReplies.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplies.ts#L11) + +*** + +### has\_channel\_owner\_replied + +> **has\_channel\_owner\_replied**: `boolean` + +Defined in: [src/parser/classes/comments/CommentReplies.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplies.ts#L15) + +*** + +### hide\_replies + +> **hide\_replies**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentReplies.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplies.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_replies + +> **view\_replies**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentReplies.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplies.ts#L12) + +*** + +### view\_replies\_creator\_thumbnail + +> **view\_replies\_creator\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/CommentReplies.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplies.ts#L14) + +*** + +### type + +> `static` **type**: `string` = `'CommentReplies'` + +Defined in: [src/parser/classes/comments/CommentReplies.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplies.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentReplies & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentReplies & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentReplyDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentReplyDialog.md new file mode 100644 index 00000000..47dc0b26 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentReplyDialog.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentReplyDialog + +# Class: CommentReplyDialog + +Defined in: [src/parser/classes/comments/CommentReplyDialog.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplyDialog.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentReplyDialog**(`data`): `CommentReplyDialog` + +Defined in: [src/parser/classes/comments/CommentReplyDialog.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplyDialog.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentReplyDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_thumbnail + +> **author\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/CommentReplyDialog.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplyDialog.ts#L14) + +*** + +### cancel\_button + +> **cancel\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentReplyDialog.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplyDialog.ts#L13) + +*** + +### error\_message + +> **error\_message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentReplyDialog.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplyDialog.ts#L16) + +*** + +### placeholder + +> **placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentReplyDialog.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplyDialog.ts#L15) + +*** + +### reply\_button + +> **reply\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentReplyDialog.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplyDialog.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentReplyDialog'` + +Defined in: [src/parser/classes/comments/CommentReplyDialog.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentReplyDialog.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentReplyDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentReplyDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentSimplebox.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentSimplebox.md new file mode 100644 index 00000000..2d57c1ad --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentSimplebox.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentSimplebox + +# Class: CommentSimplebox + +Defined in: [src/parser/classes/comments/CommentSimplebox.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentSimplebox.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentSimplebox**(`data`): `CommentSimplebox` + +Defined in: [src/parser/classes/comments/CommentSimplebox.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentSimplebox.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentSimplebox` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_thumbnail + +> **author\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/CommentSimplebox.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentSimplebox.ts#L14) + +*** + +### avatar\_size + +> **avatar\_size**: `string` + +Defined in: [src/parser/classes/comments/CommentSimplebox.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentSimplebox.ts#L16) + +*** + +### cancel\_button + +> **cancel\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentSimplebox.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentSimplebox.ts#L13) + +*** + +### placeholder + +> **placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentSimplebox.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentSimplebox.ts#L15) + +*** + +### submit\_button + +> **submit\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentSimplebox.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentSimplebox.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentSimplebox'` + +Defined in: [src/parser/classes/comments/CommentSimplebox.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentSimplebox.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentSimplebox & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentSimplebox & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentThread.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentThread.md new file mode 100644 index 00000000..4283a840 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentThread.md @@ -0,0 +1,315 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentThread + +# Class: CommentThread + +Defined in: [src/parser/classes/comments/CommentThread.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L14) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentThread**(`data`): `CommentThread` + +Defined in: [src/parser/classes/comments/CommentThread.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentThread` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### comment + +> **comment**: [`CommentView`](CommentView.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentThread.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L17) + +*** + +### comment\_replies\_data + +> **comment\_replies\_data**: [`CommentReplies`](CommentReplies.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentThread.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L19) + +*** + +### has\_replies + +> **has\_replies**: `boolean` + +Defined in: [src/parser/classes/comments/CommentThread.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L21) + +*** + +### is\_moderated\_elq\_comment + +> **is\_moderated\_elq\_comment**: `boolean` + +Defined in: [src/parser/classes/comments/CommentThread.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L20) + +*** + +### replies? + +> `optional` **replies**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CommentView`](CommentView.md)\> + +Defined in: [src/parser/classes/comments/CommentThread.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentThread'` + +Defined in: [src/parser/classes/comments/CommentThread.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L15) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### has\_continuation + +#### Get Signature + +> **get** **has\_continuation**(): `boolean` + +Defined in: [src/parser/classes/comments/CommentThread.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L34) + +##### Returns + +`boolean` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### getContinuation() + +> **getContinuation**(): `Promise`\<`CommentThread`\> + +Defined in: [src/parser/classes/comments/CommentThread.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L69) + +Retrieves next batch of replies. + +#### Returns + +`Promise`\<`CommentThread`\> + +*** + +### getReplies() + +> **getReplies**(): `Promise`\<`CommentThread`\> + +Defined in: [src/parser/classes/comments/CommentThread.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L43) + +Retrieves replies to this comment thread. + +#### Returns + +`Promise`\<`CommentThread`\> + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentThread & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentThread & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) + +*** + +### setActions() + +> **setActions**(`actions`): `void` + +Defined in: [src/parser/classes/comments/CommentThread.ts:95](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentThread.ts#L95) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +#### Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentView.md new file mode 100644 index 00000000..11f43251 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentView.md @@ -0,0 +1,647 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentView + +# Class: CommentView + +Defined in: [src/parser/classes/comments/CommentView.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L29) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentView**(`data`): `CommentView` + +Defined in: [src/parser/classes/comments/CommentView.ts:70](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L70) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author? + +> `optional` **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/comments/CommentView.ts:62](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L62) + +*** + +### author\_is\_channel\_owner? + +> `optional` **author\_is\_channel\_owner**: `boolean` + +Defined in: [src/parser/classes/comments/CommentView.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L47) + +*** + +### comment\_id + +> **comment\_id**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L41) + +*** + +### content? + +> `optional` **content**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentView.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L45) + +*** + +### creator\_thumbnail\_url? + +> `optional` **creator\_thumbnail\_url**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:48](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L48) + +*** + +### dislike\_active\_tooltip? + +> `optional` **dislike\_active\_tooltip**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L55) + +*** + +### dislike\_command? + +> `optional` **dislike\_command**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/comments/CommentView.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L35) + +*** + +### dislike\_inactive\_tooltip? + +> `optional` **dislike\_inactive\_tooltip**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:56](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L56) + +*** + +### heart\_active\_tooltip? + +> `optional` **heart\_active\_tooltip**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:57](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L57) + +*** + +### is\_disliked? + +> `optional` **is\_disliked**: `boolean` + +Defined in: [src/parser/classes/comments/CommentView.ts:65](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L65) + +*** + +### is\_hearted? + +> `optional` **is\_hearted**: `boolean` + +Defined in: [src/parser/classes/comments/CommentView.ts:66](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L66) + +*** + +### is\_liked? + +> `optional` **is\_liked**: `boolean` + +Defined in: [src/parser/classes/comments/CommentView.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L64) + +*** + +### is\_member? + +> `optional` **is\_member**: `boolean` + +Defined in: [src/parser/classes/comments/CommentView.ts:60](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L60) + +*** + +### is\_pinned + +> **is\_pinned**: `boolean` + +Defined in: [src/parser/classes/comments/CommentView.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L42) + +*** + +### keys + +> **keys**: `CommentKeys` + +Defined in: [src/parser/classes/comments/CommentView.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L43) + +*** + +### like\_active\_tooltip? + +> `optional` **like\_active\_tooltip**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:53](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L53) + +*** + +### like\_button\_a11y? + +> `optional` **like\_button\_a11y**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L49) + +*** + +### like\_command? + +> `optional` **like\_command**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/comments/CommentView.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L34) + +*** + +### like\_count? + +> `optional` **like\_count**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L50) + +*** + +### like\_count\_a11y? + +> `optional` **like\_count\_a11y**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:52](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L52) + +*** + +### like\_count\_liked? + +> `optional` **like\_count\_liked**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L51) + +*** + +### like\_inactive\_tooltip? + +> `optional` **like\_inactive\_tooltip**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:54](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L54) + +*** + +### member\_badge? + +> `optional` **member\_badge**: `MemberBadge` + +Defined in: [src/parser/classes/comments/CommentView.ts:61](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L61) + +*** + +### prepare\_account\_command? + +> `optional` **prepare\_account\_command**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/comments/CommentView.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L39) + +*** + +### published\_time? + +> `optional` **published\_time**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L46) + +*** + +### reply\_command? + +> `optional` **reply\_command**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/comments/CommentView.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L38) + +*** + +### reply\_count? + +> `optional` **reply\_count**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:58](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L58) + +*** + +### reply\_count\_a11y? + +> `optional` **reply\_count\_a11y**: `string` + +Defined in: [src/parser/classes/comments/CommentView.ts:59](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L59) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### undislike\_command? + +> `optional` **undislike\_command**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/comments/CommentView.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L37) + +*** + +### unlike\_command? + +> `optional` **unlike\_command**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/comments/CommentView.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L36) + +*** + +### voice\_reply\_container? + +> `optional` **voice\_reply\_container**: [`VoiceReplyContainerView`](VoiceReplyContainerView.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentView.ts:68](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L68) + +*** + +### type + +> `static` **type**: `string` = `'CommentView'` + +Defined in: [src/parser/classes/comments/CommentView.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L30) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### applyMutations() + +> **applyMutations**(`comment?`, `toolbar_state?`, `toolbar_surface?`, `comment_surface?`): `void` + +Defined in: [src/parser/classes/comments/CommentView.ts:85](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L85) + +#### Parameters + +##### comment? + +[`RawNode`](../../../../type-aliases/RawNode.md) + +##### toolbar\_state? + +[`RawNode`](../../../../type-aliases/RawNode.md) + +##### toolbar\_surface? + +[`RawNode`](../../../../type-aliases/RawNode.md) + +##### comment\_surface? + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`void` + +*** + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### dislike() + +> **dislike**(): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/classes/comments/CommentView.ts:167](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L167) + +Dislikes the comment. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +A promise that resolves to the API response. + +#### Throws + +If the Actions instance is not set for this comment or if the dislike command is not found. + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) + +*** + +### like() + +> **like**(): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/classes/comments/CommentView.ts:149](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L149) + +Likes the comment. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +A promise that resolves to the API response. + +#### Throws + +If the Actions instance is not set for this comment or if the like command is not found. + +*** + +### reply() + +> **reply**(`comment_text`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/classes/comments/CommentView.ts:222](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L222) + +Replies to the comment. + +#### Parameters + +##### comment\_text + +`string` + +The text of the reply. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +A promise that resolves to the API response. + +#### Throws + +If the Actions instance is not set for this comment or if the reply command is not found. + +*** + +### setActions() + +> **setActions**(`actions`): `void` + +Defined in: [src/parser/classes/comments/CommentView.ts:273](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L273) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) | `undefined` + +#### Returns + +`void` + +*** + +### translate() + +> **translate**(`target_language`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md) & `object`\> + +Defined in: [src/parser/classes/comments/CommentView.ts:251](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L251) + +Translates the comment to the specified target language. + +#### Parameters + +##### target\_language + +`string` + +The target language to translate the comment to, e.g. 'en', 'ja'. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md) & `object`\> + +Resolves to an ApiResponse object with the translated content, if available. + +#### Throws + +if the Actions instance is not set for this comment or if the comment content is not found. + +*** + +### undislike() + +> **undislike**(): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/classes/comments/CommentView.ts:203](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L203) + +Undislikes the comment. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +A promise that resolves to the API response. + +#### Throws + +If the Actions instance is not set for this comment or if the undislike command is not found. + +*** + +### unlike() + +> **unlike**(): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/classes/comments/CommentView.ts:185](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentView.ts#L185) + +Unlikes the comment. + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +A promise that resolves to the API response. + +#### Throws + +If the Actions instance is not set for this comment or if the unlike command is not found. diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsEntryPointHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsEntryPointHeader.md new file mode 100644 index 00000000..c4d71266 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsEntryPointHeader.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentsEntryPointHeader + +# Class: CommentsEntryPointHeader + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentsEntryPointHeader**(`data`): `CommentsEntryPointHeader` + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L19) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentsEntryPointHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### comment\_count? + +> `optional` **comment\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L13) + +*** + +### content\_renderer? + +> `optional` **content\_renderer**: [`CommentsSimplebox`](CommentsSimplebox.md) \| [`CommentsEntryPointTeaser`](CommentsEntryPointTeaser.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L16) + +*** + +### header? + +> `optional` **header**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L12) + +*** + +### simplebox\_placeholder? + +> `optional` **simplebox\_placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L17) + +*** + +### teaser\_avatar? + +> `optional` **teaser\_avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L14) + +*** + +### teaser\_content? + +> `optional` **teaser\_content**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentsEntryPointHeader'` + +Defined in: [src/parser/classes/comments/CommentsEntryPointHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointHeader.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentsEntryPointHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentsEntryPointHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsEntryPointTeaser.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsEntryPointTeaser.md new file mode 100644 index 00000000..cd124e9d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsEntryPointTeaser.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentsEntryPointTeaser + +# Class: CommentsEntryPointTeaser + +Defined in: [src/parser/classes/comments/CommentsEntryPointTeaser.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointTeaser.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentsEntryPointTeaser**(`data`): `CommentsEntryPointTeaser` + +Defined in: [src/parser/classes/comments/CommentsEntryPointTeaser.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointTeaser.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentsEntryPointTeaser` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### teaser\_avatar? + +> `optional` **teaser\_avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/CommentsEntryPointTeaser.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointTeaser.ts#L9) + +*** + +### teaser\_content? + +> `optional` **teaser\_content**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsEntryPointTeaser.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointTeaser.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentsEntryPointTeaser'` + +Defined in: [src/parser/classes/comments/CommentsEntryPointTeaser.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsEntryPointTeaser.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentsEntryPointTeaser & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentsEntryPointTeaser & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsHeader.md new file mode 100644 index 00000000..63d6a82b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsHeader.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentsHeader + +# Class: CommentsHeader + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L17) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentsHeader**(`data`): `CommentsHeader` + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L27) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentsHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### comments\_count + +> **comments\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L22) + +*** + +### count + +> **count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L21) + +*** + +### create\_renderer + +> **create\_renderer**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L23) + +*** + +### custom\_emojis? + +> `optional` **custom\_emojis**: `CustomEmoji`[] + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L25) + +*** + +### sort\_menu + +> **sort\_menu**: [`SortFilterSubMenu`](SortFilterSubMenu.md) \| `null` + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L24) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L20) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentsHeader'` + +Defined in: [src/parser/classes/comments/CommentsHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsHeader.ts#L18) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentsHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentsHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsSimplebox.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsSimplebox.md new file mode 100644 index 00000000..048a8878 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CommentsSimplebox.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CommentsSimplebox + +# Class: CommentsSimplebox + +Defined in: [src/parser/classes/comments/CommentsSimplebox.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsSimplebox.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CommentsSimplebox**(`data`): `CommentsSimplebox` + +Defined in: [src/parser/classes/comments/CommentsSimplebox.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsSimplebox.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CommentsSimplebox` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### simplebox\_avatar + +> **simplebox\_avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/CommentsSimplebox.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsSimplebox.ts#L9) + +*** + +### simplebox\_placeholder + +> **simplebox\_placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/CommentsSimplebox.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsSimplebox.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CommentsSimplebox'` + +Defined in: [src/parser/classes/comments/CommentsSimplebox.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CommentsSimplebox.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CommentsSimplebox & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CommentsSimplebox & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactChannel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactChannel.md new file mode 100644 index 00000000..1a5a9693 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactChannel.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CompactChannel + +# Class: CompactChannel + +Defined in: [src/parser/classes/CompactChannel.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CompactChannel**(`data`): `CompactChannel` + +Defined in: [src/parser/classes/CompactChannel.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CompactChannel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### channel\_id + +> **channel\_id**: `string` + +Defined in: [src/parser/classes/CompactChannel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L12) + +*** + +### display\_name + +> **display\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactChannel.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/CompactChannel.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L17) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/CompactChannel.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L19) + +*** + +### subscriber\_count + +> **subscriber\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactChannel.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L16) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CompactChannel.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactChannel.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L11) + +*** + +### tv\_banner + +> **tv\_banner**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CompactChannel.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactChannel.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L15) + +*** + +### type + +> `static` **type**: `string` = `'CompactChannel'` + +Defined in: [src/parser/classes/CompactChannel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactChannel.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CompactChannel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CompactChannel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactLink.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactLink.md new file mode 100644 index 00000000..e08937c7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactLink.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CompactLink + +# Class: CompactLink + +Defined in: [src/parser/classes/CompactLink.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CompactLink**(`data`): `CompactLink` + +Defined in: [src/parser/classes/CompactLink.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CompactLink` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/CompactLink.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L11) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/CompactLink.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L13) + +*** + +### secondary\_icon\_type? + +> `optional` **secondary\_icon\_type**: `string` + +Defined in: [src/parser/classes/CompactLink.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L14) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/CompactLink.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L12) + +*** + +### subtitle? + +> `optional` **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactLink.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L10) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/CompactLink.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CompactLink'` + +Defined in: [src/parser/classes/CompactLink.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactLink.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CompactLink & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CompactLink & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/CompactMix.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactMix.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/CompactMix.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/CompactMix.md index 912d3303..f739585f 100644 --- a/docs/api/namespaces/YTNodes/classes/CompactMix.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactMix.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / CompactMix +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CompactMix # Class: CompactMix +Defined in: [src/parser/classes/CompactMix.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMix.ts#L4) + ## Extends - [`Playlist`](Playlist.md) ## Constructors -### new CompactMix() +### Constructor -> **new CompactMix**(`data`): [`CompactMix`](CompactMix.md) +> **new CompactMix**(`data`): `CompactMix` + +Defined in: [src/parser/classes/CompactMix.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMix.ts#L7) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`CompactMix`](CompactMix.md) +`CompactMix` #### Overrides -[`Playlist`](Playlist.md).[`constructor`](Playlist.md#constructors) - -#### Defined in - -[src/parser/classes/CompactMix.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CompactMix.ts#L7) +[`Playlist`](Playlist.md).[`constructor`](Playlist.md#constructor) ## Properties @@ -34,241 +36,217 @@ > **author**: [`Text`](../../Misc/classes/Text.md) \| [`Author`](../../Misc/classes/Author.md) +Defined in: [src/parser/classes/Playlist.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L15) + #### Inherited from [`Playlist`](Playlist.md).[`author`](Playlist.md#author) -#### Defined in - -[src/parser/classes/Playlist.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L15) - *** ### badges > **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L23) + #### Inherited from [`Playlist`](Playlist.md).[`badges`](Playlist.md#badges) -#### Defined in - -[src/parser/classes/Playlist.ts:23](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L23) - *** ### endpoint > **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) +Defined in: [src/parser/classes/Playlist.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L24) + #### Inherited from [`Playlist`](Playlist.md).[`endpoint`](Playlist.md#endpoint) -#### Defined in - -[src/parser/classes/Playlist.ts:24](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L24) - *** ### first\_videos > **first\_videos**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L20) + #### Inherited from [`Playlist`](Playlist.md).[`first_videos`](Playlist.md#first_videos) -#### Defined in - -[src/parser/classes/Playlist.ts:20](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L20) - *** ### id > **id**: `string` +Defined in: [src/parser/classes/Playlist.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L13) + #### Inherited from [`Playlist`](Playlist.md).[`id`](Playlist.md#id) -#### Defined in - -[src/parser/classes/Playlist.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L13) - *** ### menu > **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) +Defined in: [src/parser/classes/Playlist.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L22) + #### Inherited from [`Playlist`](Playlist.md).[`menu`](Playlist.md#menu) -#### Defined in - -[src/parser/classes/Playlist.ts:22](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L22) - *** ### share\_url -> **share\_url**: `null` \| `string` +> **share\_url**: `string` \| `null` + +Defined in: [src/parser/classes/Playlist.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L21) #### Inherited from [`Playlist`](Playlist.md).[`share_url`](Playlist.md#share_url) -#### Defined in - -[src/parser/classes/Playlist.ts:21](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L21) - *** ### thumbnail\_overlays > **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L25) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnail_overlays`](Playlist.md#thumbnail_overlays) -#### Defined in - -[src/parser/classes/Playlist.ts:25](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L25) - *** ### thumbnail\_renderer? > `optional` **thumbnail\_renderer**: [`PlaylistCustomThumbnail`](PlaylistCustomThumbnail.md) \| [`PlaylistVideoThumbnail`](PlaylistVideoThumbnail.md) +Defined in: [src/parser/classes/Playlist.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L17) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnail_renderer`](Playlist.md#thumbnail_renderer) -#### Defined in - -[src/parser/classes/Playlist.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L17) - *** ### thumbnails > **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] +Defined in: [src/parser/classes/Playlist.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L16) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnails`](Playlist.md#thumbnails) -#### Defined in - -[src/parser/classes/Playlist.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L16) - *** ### title > **title**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L14) + #### Inherited from [`Playlist`](Playlist.md).[`title`](Playlist.md#title) -#### Defined in - -[src/parser/classes/Playlist.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L14) - *** ### type > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`Playlist`](Playlist.md).[`type`](Playlist.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### video\_count > **video\_count**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L18) + #### Inherited from [`Playlist`](Playlist.md).[`video_count`](Playlist.md#video_count) -#### Defined in - -[src/parser/classes/Playlist.ts:18](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L18) - *** ### video\_count\_short > **video\_count\_short**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L19) + #### Inherited from [`Playlist`](Playlist.md).[`video_count_short`](Playlist.md#video_count_short) -#### Defined in - -[src/parser/classes/Playlist.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L19) - *** ### view\_playlist? > `optional` **view\_playlist**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L26) + #### Inherited from [`Playlist`](Playlist.md).[`view_playlist`](Playlist.md#view_playlist) -#### Defined in - -[src/parser/classes/Playlist.ts:26](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L26) - *** ### type > `static` **type**: `string` = `'CompactMix'` +Defined in: [src/parser/classes/CompactMix.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMix.ts#L5) + #### Overrides [`Playlist`](Playlist.md).[`type`](Playlist.md#type-1) -#### Defined in - -[src/parser/classes/CompactMix.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CompactMix.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -286,27 +264,31 @@ If the node is not of the given type [`Playlist`](Playlist.md).[`as`](Playlist.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is CompactMix & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -320,27 +302,31 @@ Whether the node has the key [`Playlist`](Playlist.md).[`hasKey`](Playlist.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -354,27 +340,31 @@ whether the node is of the given type [`Playlist`](Playlist.md).[`is`](Playlist.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -391,7 +381,3 @@ If the node does not have the key #### Inherited from [`Playlist`](Playlist.md).[`key`](Playlist.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactMovie.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactMovie.md new file mode 100644 index 00000000..d020e06b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactMovie.md @@ -0,0 +1,311 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CompactMovie + +# Class: CompactMovie + +Defined in: [src/parser/classes/CompactMovie.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L11) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CompactMovie**(`data`): `CompactMovie` + +Defined in: [src/parser/classes/CompactMovie.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L31) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CompactMovie` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/CompactMovie.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L19) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/CompactMovie.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L27) + +*** + +### duration + +> **duration**: `object` + +Defined in: [src/parser/classes/CompactMovie.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L21) + +#### seconds + +> **seconds**: `number` + +#### text + +> **text**: `string` + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/CompactMovie.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L26) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/CompactMovie.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L14) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/CompactMovie.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L29) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/CompactMovie.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L18) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CompactMovie.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L17) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactMovie.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L15) + +*** + +### top\_metadata\_items + +> **top\_metadata\_items**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactMovie.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### use\_vertical\_poster + +> **use\_vertical\_poster**: `boolean` + +Defined in: [src/parser/classes/CompactMovie.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L28) + +*** + +### type + +> `static` **type**: `string` = `'CompactMovie'` + +Defined in: [src/parser/classes/CompactMovie.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactMovie.ts#L12) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CompactMovie & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CompactMovie & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/CompactPlaylist.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactPlaylist.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/CompactPlaylist.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/CompactPlaylist.md index 3b339282..ac9e521c 100644 --- a/docs/api/namespaces/YTNodes/classes/CompactPlaylist.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactPlaylist.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / CompactPlaylist +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CompactPlaylist # Class: CompactPlaylist +Defined in: [src/parser/classes/CompactPlaylist.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactPlaylist.ts#L4) + ## Extends - [`Playlist`](Playlist.md) ## Constructors -### new CompactPlaylist() +### Constructor -> **new CompactPlaylist**(`data`): [`CompactPlaylist`](CompactPlaylist.md) +> **new CompactPlaylist**(`data`): `CompactPlaylist` + +Defined in: [src/parser/classes/CompactPlaylist.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactPlaylist.ts#L7) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`CompactPlaylist`](CompactPlaylist.md) +`CompactPlaylist` #### Overrides -[`Playlist`](Playlist.md).[`constructor`](Playlist.md#constructors) - -#### Defined in - -[src/parser/classes/CompactPlaylist.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CompactPlaylist.ts#L7) +[`Playlist`](Playlist.md).[`constructor`](Playlist.md#constructor) ## Properties @@ -34,241 +36,217 @@ > **author**: [`Text`](../../Misc/classes/Text.md) \| [`Author`](../../Misc/classes/Author.md) +Defined in: [src/parser/classes/Playlist.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L15) + #### Inherited from [`Playlist`](Playlist.md).[`author`](Playlist.md#author) -#### Defined in - -[src/parser/classes/Playlist.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L15) - *** ### badges > **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L23) + #### Inherited from [`Playlist`](Playlist.md).[`badges`](Playlist.md#badges) -#### Defined in - -[src/parser/classes/Playlist.ts:23](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L23) - *** ### endpoint > **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) +Defined in: [src/parser/classes/Playlist.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L24) + #### Inherited from [`Playlist`](Playlist.md).[`endpoint`](Playlist.md#endpoint) -#### Defined in - -[src/parser/classes/Playlist.ts:24](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L24) - *** ### first\_videos > **first\_videos**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L20) + #### Inherited from [`Playlist`](Playlist.md).[`first_videos`](Playlist.md#first_videos) -#### Defined in - -[src/parser/classes/Playlist.ts:20](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L20) - *** ### id > **id**: `string` +Defined in: [src/parser/classes/Playlist.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L13) + #### Inherited from [`Playlist`](Playlist.md).[`id`](Playlist.md#id) -#### Defined in - -[src/parser/classes/Playlist.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L13) - *** ### menu > **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) +Defined in: [src/parser/classes/Playlist.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L22) + #### Inherited from [`Playlist`](Playlist.md).[`menu`](Playlist.md#menu) -#### Defined in - -[src/parser/classes/Playlist.ts:22](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L22) - *** ### share\_url -> **share\_url**: `null` \| `string` +> **share\_url**: `string` \| `null` + +Defined in: [src/parser/classes/Playlist.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L21) #### Inherited from [`Playlist`](Playlist.md).[`share_url`](Playlist.md#share_url) -#### Defined in - -[src/parser/classes/Playlist.ts:21](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L21) - *** ### thumbnail\_overlays > **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L25) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnail_overlays`](Playlist.md#thumbnail_overlays) -#### Defined in - -[src/parser/classes/Playlist.ts:25](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L25) - *** ### thumbnail\_renderer? > `optional` **thumbnail\_renderer**: [`PlaylistCustomThumbnail`](PlaylistCustomThumbnail.md) \| [`PlaylistVideoThumbnail`](PlaylistVideoThumbnail.md) +Defined in: [src/parser/classes/Playlist.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L17) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnail_renderer`](Playlist.md#thumbnail_renderer) -#### Defined in - -[src/parser/classes/Playlist.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L17) - *** ### thumbnails > **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] +Defined in: [src/parser/classes/Playlist.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L16) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnails`](Playlist.md#thumbnails) -#### Defined in - -[src/parser/classes/Playlist.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L16) - *** ### title > **title**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L14) + #### Inherited from [`Playlist`](Playlist.md).[`title`](Playlist.md#title) -#### Defined in - -[src/parser/classes/Playlist.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L14) - *** ### type > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`Playlist`](Playlist.md).[`type`](Playlist.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### video\_count > **video\_count**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L18) + #### Inherited from [`Playlist`](Playlist.md).[`video_count`](Playlist.md#video_count) -#### Defined in - -[src/parser/classes/Playlist.ts:18](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L18) - *** ### video\_count\_short > **video\_count\_short**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L19) + #### Inherited from [`Playlist`](Playlist.md).[`video_count_short`](Playlist.md#video_count_short) -#### Defined in - -[src/parser/classes/Playlist.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L19) - *** ### view\_playlist? > `optional` **view\_playlist**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L26) + #### Inherited from [`Playlist`](Playlist.md).[`view_playlist`](Playlist.md#view_playlist) -#### Defined in - -[src/parser/classes/Playlist.ts:26](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L26) - *** ### type > `static` **type**: `string` = `'CompactPlaylist'` +Defined in: [src/parser/classes/CompactPlaylist.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactPlaylist.ts#L5) + #### Overrides [`Playlist`](Playlist.md).[`type`](Playlist.md#type-1) -#### Defined in - -[src/parser/classes/CompactPlaylist.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CompactPlaylist.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -286,27 +264,31 @@ If the node is not of the given type [`Playlist`](Playlist.md).[`as`](Playlist.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is CompactPlaylist & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -320,27 +302,31 @@ Whether the node has the key [`Playlist`](Playlist.md).[`hasKey`](Playlist.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -354,27 +340,31 @@ whether the node is of the given type [`Playlist`](Playlist.md).[`is`](Playlist.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -391,7 +381,3 @@ If the node does not have the key #### Inherited from [`Playlist`](Playlist.md).[`key`](Playlist.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactStation.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactStation.md new file mode 100644 index 00000000..5403fa81 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactStation.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CompactStation + +# Class: CompactStation + +Defined in: [src/parser/classes/CompactStation.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactStation.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CompactStation**(`data`): `CompactStation` + +Defined in: [src/parser/classes/CompactStation.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactStation.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CompactStation` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactStation.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactStation.ts#L11) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/CompactStation.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactStation.ts#L13) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CompactStation.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactStation.ts#L14) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactStation.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactStation.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactStation.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactStation.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'CompactStation'` + +Defined in: [src/parser/classes/CompactStation.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactStation.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CompactStation & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CompactStation & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactVideo.md new file mode 100644 index 00000000..e01e5ef6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompactVideo.md @@ -0,0 +1,477 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CompactVideo + +# Class: CompactVideo + +Defined in: [src/parser/classes/CompactVideo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L12) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CompactVideo**(`data`): `CompactVideo` + +Defined in: [src/parser/classes/CompactVideo.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L35) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CompactVideo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/CompactVideo.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L19) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MetadataBadge`](MetadataBadge.md)\> + +Defined in: [src/parser/classes/CompactVideo.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L25) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/CompactVideo.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L27) + +*** + +### is\_watched + +> **is\_watched**: `boolean` + +Defined in: [src/parser/classes/CompactVideo.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L30) + +*** + +### length\_text? + +> `optional` **length\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactVideo.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L29) + +*** + +### long\_byline\_text? + +> `optional` **long\_byline\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactVideo.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L23) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/CompactVideo.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L28) + +*** + +### published? + +> `optional` **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactVideo.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L24) + +*** + +### rich\_thumbnail? + +> `optional` **rich\_thumbnail**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/CompactVideo.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L17) + +*** + +### service\_endpoint? + +> `optional` **service\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/CompactVideo.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L32) + +*** + +### service\_endpoints? + +> `optional` **service\_endpoints**: [`NavigationEndpoint`](NavigationEndpoint.md)[] + +Defined in: [src/parser/classes/CompactVideo.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L31) + +*** + +### short\_byline\_text? + +> `optional` **short\_byline\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactVideo.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L22) + +*** + +### short\_view\_count? + +> `optional` **short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactVideo.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L21) + +*** + +### style? + +> `optional` **style**: `"COMPACT_VIDEO_STYLE_TYPE_UNKNOWN"` \| `"COMPACT_VIDEO_STYLE_TYPE_NORMAL"` \| `"COMPACT_VIDEO_STYLE_TYPE_PROMINENT_THUMBNAIL"` \| `"COMPACT_VIDEO_STYLE_TYPE_HERO"` + +Defined in: [src/parser/classes/CompactVideo.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L33) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/CompactVideo.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L26) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/CompactVideo.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L16) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactVideo.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/CompactVideo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L15) + +*** + +### view\_count? + +> `optional` **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/CompactVideo.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L20) + +*** + +### type + +> `static` **type**: `string` = `'CompactVideo'` + +Defined in: [src/parser/classes/CompactVideo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L13) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### best\_thumbnail + +#### Get Signature + +> **get** **best\_thumbnail**(): [`Thumbnail`](../../Misc/classes/Thumbnail.md) + +Defined in: [src/parser/classes/CompactVideo.ts:96](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L96) + +##### Returns + +[`Thumbnail`](../../Misc/classes/Thumbnail.md) + +*** + +### duration + +#### Get Signature + +> **get** **duration**(): `object` + +Defined in: [src/parser/classes/CompactVideo.ts:87](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L87) + +##### Returns + +`object` + +###### seconds + +> **seconds**: `number` + +###### text + +> **text**: `string` \| `undefined` = `length_text` + +*** + +### id + +#### Get Signature + +> **get** **id**(): `string` + +Defined in: [src/parser/classes/CompactVideo.ts:83](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L83) + +##### Deprecated + +Use [`video_id`](#video_id) instead. + +##### Returns + +`string` + +*** + +### is\_fundraiser + +#### Get Signature + +> **get** **is\_fundraiser**(): `boolean` + +Defined in: [src/parser/classes/CompactVideo.ts:100](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L100) + +##### Returns + +`boolean` + +*** + +### is\_live + +#### Get Signature + +> **get** **is\_live**(): `boolean` + +Defined in: [src/parser/classes/CompactVideo.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L104) + +##### Returns + +`boolean` + +*** + +### is\_new + +#### Get Signature + +> **get** **is\_new**(): `boolean` + +Defined in: [src/parser/classes/CompactVideo.ts:111](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L111) + +##### Returns + +`boolean` + +*** + +### is\_premiere + +#### Get Signature + +> **get** **is\_premiere**(): `boolean` + +Defined in: [src/parser/classes/CompactVideo.ts:115](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompactVideo.ts#L115) + +##### Returns + +`boolean` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CompactVideo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CompactVideo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/CompositeVideoPrimaryInfo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompositeVideoPrimaryInfo.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/CompositeVideoPrimaryInfo.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/CompositeVideoPrimaryInfo.md index 2e083528..f063166d 100644 --- a/docs/api/namespaces/YTNodes/classes/CompositeVideoPrimaryInfo.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CompositeVideoPrimaryInfo.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / CompositeVideoPrimaryInfo +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CompositeVideoPrimaryInfo # Class: CompositeVideoPrimaryInfo +Defined in: [src/parser/classes/CompositeVideoPrimaryInfo.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompositeVideoPrimaryInfo.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new CompositeVideoPrimaryInfo() +### Constructor -> **new CompositeVideoPrimaryInfo**(`data`): [`CompositeVideoPrimaryInfo`](CompositeVideoPrimaryInfo.md) +> **new CompositeVideoPrimaryInfo**(`data`): `CompositeVideoPrimaryInfo` + +Defined in: [src/parser/classes/CompositeVideoPrimaryInfo.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompositeVideoPrimaryInfo.ts#L8) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`CompositeVideoPrimaryInfo`](CompositeVideoPrimaryInfo.md) +`CompositeVideoPrimaryInfo` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/CompositeVideoPrimaryInfo.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CompositeVideoPrimaryInfo.ts#L8) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,45 +36,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'CompositeVideoPrimaryInfo'` +Defined in: [src/parser/classes/CompositeVideoPrimaryInfo.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CompositeVideoPrimaryInfo.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/CompositeVideoPrimaryInfo.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/CompositeVideoPrimaryInfo.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -90,27 +96,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is CompositeVideoPrimaryInfo & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -124,27 +134,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -158,27 +172,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -195,7 +213,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ConfirmDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ConfirmDialog.md new file mode 100644 index 00000000..b52f64ca --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ConfirmDialog.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ConfirmDialog + +# Class: ConfirmDialog + +Defined in: [src/parser/classes/ConfirmDialog.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConfirmDialog.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ConfirmDialog**(`data`): `ConfirmDialog` + +Defined in: [src/parser/classes/ConfirmDialog.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConfirmDialog.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ConfirmDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### cancel\_button + +> **cancel\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ConfirmDialog.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConfirmDialog.ts#L11) + +*** + +### confirm\_button + +> **confirm\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ConfirmDialog.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConfirmDialog.ts#L10) + +*** + +### dialog\_messages + +> **dialog\_messages**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/ConfirmDialog.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConfirmDialog.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ConfirmDialog.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConfirmDialog.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ConfirmDialog'` + +Defined in: [src/parser/classes/ConfirmDialog.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConfirmDialog.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ConfirmDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ConfirmDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ContentMetadataView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ContentMetadataView.md new file mode 100644 index 00000000..0e4e9f91 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ContentMetadataView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ContentMetadataView + +# Class: ContentMetadataView + +Defined in: [src/parser/classes/ContentMetadataView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentMetadataView.ts#L18) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ContentMetadataView**(`data`): `ContentMetadataView` + +Defined in: [src/parser/classes/ContentMetadataView.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentMetadataView.ts#L24) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ContentMetadataView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### delimiter + +> **delimiter**: `string` + +Defined in: [src/parser/classes/ContentMetadataView.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentMetadataView.ts#L22) + +*** + +### metadata\_rows + +> **metadata\_rows**: `MetadataRow`[] + +Defined in: [src/parser/classes/ContentMetadataView.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentMetadataView.ts#L21) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ContentMetadataView'` + +Defined in: [src/parser/classes/ContentMetadataView.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentMetadataView.ts#L19) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ContentMetadataView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ContentMetadataView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ContentPreviewImageView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ContentPreviewImageView.md new file mode 100644 index 00000000..1f91f9e8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ContentPreviewImageView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ContentPreviewImageView + +# Class: ContentPreviewImageView + +Defined in: [src/parser/classes/ContentPreviewImageView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentPreviewImageView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ContentPreviewImageView**(`data`): `ContentPreviewImageView` + +Defined in: [src/parser/classes/ContentPreviewImageView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentPreviewImageView.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ContentPreviewImageView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### image + +> **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ContentPreviewImageView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentPreviewImageView.ts#L8) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/ContentPreviewImageView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentPreviewImageView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ContentPreviewImageView'` + +Defined in: [src/parser/classes/ContentPreviewImageView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContentPreviewImageView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ContentPreviewImageView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ContentPreviewImageView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ContinuationCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ContinuationCommand.md new file mode 100644 index 00000000..4e68ad04 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ContinuationCommand.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ContinuationCommand + +# Class: ContinuationCommand + +Defined in: [src/parser/classes/commands/ContinuationCommand.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ContinuationCommand.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`ContinuationRequest`](../../../../type-aliases/ContinuationRequest.md)\> + +## Constructors + +### Constructor + +> **new ContinuationCommand**(`data`): `ContinuationCommand` + +Defined in: [src/parser/classes/commands/ContinuationCommand.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ContinuationCommand.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ContinuationCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ContinuationCommand'` + +Defined in: [src/parser/classes/commands/ContinuationCommand.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ContinuationCommand.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`ContinuationRequest`](../../../../type-aliases/ContinuationRequest.md) + +Defined in: [src/parser/classes/commands/ContinuationCommand.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ContinuationCommand.ts#L37) + +#### Returns + +[`ContinuationRequest`](../../../../type-aliases/ContinuationRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/commands/ContinuationCommand.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ContinuationCommand.ts#L14) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **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/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ContinuationCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ContinuationItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ContinuationItem.md new file mode 100644 index 00000000..218643bf --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ContinuationItem.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ContinuationItem + +# Class: ContinuationItem + +Defined in: [src/parser/classes/ContinuationItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContinuationItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ContinuationItem**(`data`): `ContinuationItem` + +Defined in: [src/parser/classes/ContinuationItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContinuationItem.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ContinuationItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button? + +> `optional` **button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ContinuationItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContinuationItem.ts#L10) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ContinuationItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContinuationItem.ts#L11) + +*** + +### trigger + +> **trigger**: `string` + +Defined in: [src/parser/classes/ContinuationItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContinuationItem.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ContinuationItem'` + +Defined in: [src/parser/classes/ContinuationItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ContinuationItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ContinuationItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ContinuationItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ConversationBar.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ConversationBar.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ConversationBar.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ConversationBar.md index 8c983602..6691a1e2 100644 --- a/docs/api/namespaces/YTNodes/classes/ConversationBar.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ConversationBar.md @@ -1,42 +1,42 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ConversationBar +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ConversationBar # Class: ConversationBar +Defined in: [src/parser/classes/ConversationBar.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConversationBar.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ConversationBar() +### Constructor -> **new ConversationBar**(`data`): [`ConversationBar`](ConversationBar.md) +> **new ConversationBar**(`data`): `ConversationBar` + +Defined in: [src/parser/classes/ConversationBar.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConversationBar.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ConversationBar`](ConversationBar.md) +`ConversationBar` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ConversationBar.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ConversationBar.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties ### availability\_message -> **availability\_message**: `null` \| [`Message`](Message.md) +> **availability\_message**: [`Message`](Message.md) \| `null` -#### Defined in - -[src/parser/classes/ConversationBar.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ConversationBar.ts#L8) +Defined in: [src/parser/classes/ConversationBar.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConversationBar.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ConversationBar'` +Defined in: [src/parser/classes/ConversationBar.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ConversationBar.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ConversationBar.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ConversationBar.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ConversationBar & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CopyLink.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CopyLink.md new file mode 100644 index 00000000..55157765 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CopyLink.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CopyLink + +# Class: CopyLink + +Defined in: [src/parser/classes/CopyLink.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CopyLink.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CopyLink**(`data`): `CopyLink` + +Defined in: [src/parser/classes/CopyLink.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CopyLink.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CopyLink` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### copy\_button + +> **copy\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/CopyLink.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CopyLink.ts#L8) + +*** + +### short\_url + +> **short\_url**: `string` + +Defined in: [src/parser/classes/CopyLink.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CopyLink.ts#L9) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/CopyLink.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CopyLink.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CopyLink'` + +Defined in: [src/parser/classes/CopyLink.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CopyLink.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CopyLink & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CopyLink & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CreateCommentEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreateCommentEndpoint.md new file mode 100644 index 00000000..2aafbf9c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreateCommentEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CreateCommentEndpoint + +# Class: CreateCommentEndpoint + +Defined in: [src/parser/classes/endpoints/CreateCommentEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreateCommentEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`CreateCommentRequest`](../../../../type-aliases/CreateCommentRequest.md)\> + +## Constructors + +### Constructor + +> **new CreateCommentEndpoint**(`data`): `CreateCommentEndpoint` + +Defined in: [src/parser/classes/endpoints/CreateCommentEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreateCommentEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CreateCommentEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CreateCommentEndpoint'` + +Defined in: [src/parser/classes/endpoints/CreateCommentEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreateCommentEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`CreateCommentRequest`](../../../../type-aliases/CreateCommentRequest.md) + +Defined in: [src/parser/classes/endpoints/CreateCommentEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreateCommentEndpoint.ts#L20) + +#### Returns + +[`CreateCommentRequest`](../../../../type-aliases/CreateCommentRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/CreateCommentEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreateCommentEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CreateCommentEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CreateCommentEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistDialog.md new file mode 100644 index 00000000..acc776f1 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistDialog.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CreatePlaylistDialog + +# Class: CreatePlaylistDialog + +Defined in: [src/parser/classes/CreatePlaylistDialog.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialog.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CreatePlaylistDialog**(`data`): `CreatePlaylistDialog` + +Defined in: [src/parser/classes/CreatePlaylistDialog.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialog.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CreatePlaylistDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### cancel\_button + +> **cancel\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/CreatePlaylistDialog.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialog.ts#L13) + +*** + +### create\_button + +> **create\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/CreatePlaylistDialog.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialog.ts#L14) + +*** + +### privacy\_option + +> **privacy\_option**: [`Dropdown`](Dropdown.md) \| `null` + +Defined in: [src/parser/classes/CreatePlaylistDialog.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialog.ts#L12) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/CreatePlaylistDialog.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialog.ts#L10) + +*** + +### title\_placeholder + +> **title\_placeholder**: `string` + +Defined in: [src/parser/classes/CreatePlaylistDialog.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialog.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CreatePlaylistDialog'` + +Defined in: [src/parser/classes/CreatePlaylistDialog.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialog.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CreatePlaylistDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CreatePlaylistDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistDialogFormView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistDialogFormView.md new file mode 100644 index 00000000..87097448 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistDialogFormView.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CreatePlaylistDialogFormView + +# Class: CreatePlaylistDialogFormView + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CreatePlaylistDialogFormView**(`data`): `CreatePlaylistDialogFormView` + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CreatePlaylistDialogFormView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### create\_playlist\_params\_collaboration\_disabled + +> **create\_playlist\_params\_collaboration\_disabled**: `string` + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L13) + +*** + +### create\_playlist\_params\_collaboration\_enabled + +> **create\_playlist\_params\_collaboration\_enabled**: `string` + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L12) + +*** + +### disable\_playlist\_collaborate + +> **disable\_playlist\_collaborate**: `boolean` + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L11) + +*** + +### playlist\_title + +> **playlist\_title**: [`TextFieldView`](TextFieldView.md) \| `null` + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L9) + +*** + +### playlist\_visibility + +> **playlist\_visibility**: [`DropdownView`](DropdownView.md) \| `null` + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_ids + +> **video\_ids**: `string`[] + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L14) + +*** + +### type + +> `static` **type**: `string` = `'CreatePlaylistDialogFormView'` + +Defined in: [src/parser/classes/CreatePlaylistDialogFormView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/CreatePlaylistDialogFormView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CreatePlaylistDialogFormView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CreatePlaylistDialogFormView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistServiceEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistServiceEndpoint.md new file mode 100644 index 00000000..e0ef1533 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatePlaylistServiceEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CreatePlaylistServiceEndpoint + +# Class: CreatePlaylistServiceEndpoint + +Defined in: [src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`CreatePlaylistServiceRequest`](../../../../type-aliases/CreatePlaylistServiceRequest.md)\> + +## Constructors + +### Constructor + +> **new CreatePlaylistServiceEndpoint**(`data`): `CreatePlaylistServiceEndpoint` + +Defined in: [src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CreatePlaylistServiceEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CreatePlaylistServiceEndpoint'` + +Defined in: [src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`CreatePlaylistServiceRequest`](../../../../type-aliases/CreatePlaylistServiceRequest.md) + +Defined in: [src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts#L20) + +#### Returns + +[`CreatePlaylistServiceRequest`](../../../../type-aliases/CreatePlaylistServiceRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/CreatePlaylistServiceEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CreatePlaylistServiceEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CreatePlaylistServiceEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatorHeart.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatorHeart.md new file mode 100644 index 00000000..aae7ab50 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatorHeart.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CreatorHeart + +# Class: CreatorHeart + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CreatorHeart**(`data`): `CreatorHeart` + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CreatorHeart` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### creator\_thumbnail + +> **creator\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L8) + +*** + +### heart\_color + +> **heart\_color**: `object` + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L10) + +#### basic\_color\_palette\_data + +> **basic\_color\_palette\_data**: `object` + +##### basic\_color\_palette\_data.foreground\_title\_color + +> **foreground\_title\_color**: `string` + +*** + +### heart\_icon\_type? + +> `optional` **heart\_icon\_type**: `string` + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L9) + +*** + +### hearted\_tooltip + +> **hearted\_tooltip**: `string` + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L15) + +*** + +### is\_enabled + +> **is\_enabled**: `boolean` + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L17) + +*** + +### is\_hearted + +> **is\_hearted**: `boolean` + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L16) + +*** + +### kennedy\_heart\_color\_string + +> **kennedy\_heart\_color\_string**: `string` + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'CreatorHeart'` + +Defined in: [src/parser/classes/comments/CreatorHeart.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/CreatorHeart.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CreatorHeart & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CreatorHeart & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatorHeartView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatorHeartView.md new file mode 100644 index 00000000..d8597448 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/CreatorHeartView.md @@ -0,0 +1,291 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / CreatorHeartView + +# Class: CreatorHeartView + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new CreatorHeartView**(`data`): `CreatorHeartView` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`CreatorHeartView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### creator\_thumbnail + +> **creator\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L8) + +*** + +### engagement\_state\_key + +> **engagement\_state\_key**: `string` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L21) + +*** + +### hearted\_accessibility\_label + +> **hearted\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L19) + +*** + +### hearted\_hover\_text + +> **hearted\_hover\_text**: `string` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L18) + +*** + +### hearted\_icon\_name + +> **hearted\_icon\_name**: `string` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### unhearted\_accessibility\_label + +> **unhearted\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L20) + +*** + +### unhearted\_icon\_name + +> **unhearted\_icon\_name**: `string` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L10) + +*** + +### unhearted\_icon\_processor + +> **unhearted\_icon\_processor**: `object` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L11) + +#### border\_image\_processor + +> **border\_image\_processor**: `object` + +##### border\_image\_processor.image\_tint + +> **image\_tint**: `object` + +##### border\_image\_processor.image\_tint.color + +> **color**: `number` + +*** + +### type + +> `static` **type**: `string` = `'CreatorHeartView'` + +Defined in: [src/parser/classes/livechat/items/CreatorHeartView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/CreatorHeartView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is CreatorHeartView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is CreatorHeartView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DecoratedAvatarView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DecoratedAvatarView.md new file mode 100644 index 00000000..f1467950 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DecoratedAvatarView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DecoratedAvatarView + +# Class: DecoratedAvatarView + +Defined in: [src/parser/classes/DecoratedAvatarView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedAvatarView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DecoratedAvatarView**(`data`): `DecoratedAvatarView` + +Defined in: [src/parser/classes/DecoratedAvatarView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedAvatarView.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DecoratedAvatarView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### a11y\_label + +> **a11y\_label**: `string` + +Defined in: [src/parser/classes/DecoratedAvatarView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedAvatarView.ts#L10) + +*** + +### avatar + +> **avatar**: [`AvatarView`](AvatarView.md) \| `null` + +Defined in: [src/parser/classes/DecoratedAvatarView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedAvatarView.ts#L9) + +*** + +### renderer\_context + +> **renderer\_context**: [`RendererContext`](../../Misc/classes/RendererContext.md) + +Defined in: [src/parser/classes/DecoratedAvatarView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedAvatarView.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DecoratedAvatarView'` + +Defined in: [src/parser/classes/DecoratedAvatarView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedAvatarView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DecoratedAvatarView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DecoratedAvatarView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DecoratedPlayerBar.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DecoratedPlayerBar.md new file mode 100644 index 00000000..02911606 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DecoratedPlayerBar.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DecoratedPlayerBar + +# Class: DecoratedPlayerBar + +Defined in: [src/parser/classes/DecoratedPlayerBar.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedPlayerBar.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DecoratedPlayerBar**(`data`): `DecoratedPlayerBar` + +Defined in: [src/parser/classes/DecoratedPlayerBar.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedPlayerBar.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DecoratedPlayerBar` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### player\_bar + +> **player\_bar**: [`MultiMarkersPlayerBar`](MultiMarkersPlayerBar.md) \| `null` + +Defined in: [src/parser/classes/DecoratedPlayerBar.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedPlayerBar.ts#L10) + +*** + +### player\_bar\_action\_button + +> **player\_bar\_action\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/DecoratedPlayerBar.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedPlayerBar.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DecoratedPlayerBar'` + +Defined in: [src/parser/classes/DecoratedPlayerBar.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DecoratedPlayerBar.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DecoratedPlayerBar & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DecoratedPlayerBar & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DefaultPromoPanel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DefaultPromoPanel.md new file mode 100644 index 00000000..d70cbf6c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DefaultPromoPanel.md @@ -0,0 +1,303 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DefaultPromoPanel + +# Class: DefaultPromoPanel + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DefaultPromoPanel**(`data`): `DefaultPromoPanel` + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DefaultPromoPanel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L10) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L11) + +*** + +### large\_form\_factor\_background\_thumbnail + +> **large\_form\_factor\_background\_thumbnail**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L12) + +*** + +### metadata\_order + +> **metadata\_order**: `string` + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L18) + +*** + +### min\_panel\_display\_duration\_ms + +> **min\_panel\_display\_duration\_ms**: `number` + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L15) + +*** + +### min\_video\_play\_duration\_ms + +> **min\_video\_play\_duration\_ms**: `number` + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L16) + +*** + +### panel\_layout + +> **panel\_layout**: `string` + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L19) + +*** + +### scrim\_color\_values + +> **scrim\_color\_values**: `number`[] + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L14) + +*** + +### scrim\_duration + +> **scrim\_duration**: `number` + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L17) + +*** + +### small\_form\_factor\_background\_thumbnail + +> **small\_form\_factor\_background\_thumbnail**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DefaultPromoPanel'` + +Defined in: [src/parser/classes/DefaultPromoPanel.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DefaultPromoPanel.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DefaultPromoPanel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DefaultPromoPanel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DeletePlaylistEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DeletePlaylistEndpoint.md new file mode 100644 index 00000000..887232d2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DeletePlaylistEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DeletePlaylistEndpoint + +# Class: DeletePlaylistEndpoint + +Defined in: [src/parser/classes/endpoints/DeletePlaylistEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/DeletePlaylistEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`DeletePlaylistServiceRequest`](../../../../type-aliases/DeletePlaylistServiceRequest.md)\> + +## Constructors + +### Constructor + +> **new DeletePlaylistEndpoint**(`data`): `DeletePlaylistEndpoint` + +Defined in: [src/parser/classes/endpoints/DeletePlaylistEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/DeletePlaylistEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DeletePlaylistEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DeletePlaylistEndpoint'` + +Defined in: [src/parser/classes/endpoints/DeletePlaylistEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/DeletePlaylistEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`DeletePlaylistServiceRequest`](../../../../type-aliases/DeletePlaylistServiceRequest.md) + +Defined in: [src/parser/classes/endpoints/DeletePlaylistEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/DeletePlaylistEndpoint.ts#L20) + +#### Returns + +[`DeletePlaylistServiceRequest`](../../../../type-aliases/DeletePlaylistServiceRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/DeletePlaylistEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/DeletePlaylistEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DeletePlaylistEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DeletePlaylistEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DescriptionPreviewView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DescriptionPreviewView.md new file mode 100644 index 00000000..e5539f7b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DescriptionPreviewView.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DescriptionPreviewView + +# Class: DescriptionPreviewView + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DescriptionPreviewView**(`data`): `DescriptionPreviewView` + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DescriptionPreviewView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### always\_show\_truncation\_text + +> **always\_show\_truncation\_text**: `boolean` + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L13) + +*** + +### description? + +> `optional` **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L10) + +*** + +### max\_lines? + +> `optional` **max\_lines**: `number` + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L11) + +*** + +### more\_endpoint? + +> `optional` **more\_endpoint**: `object` + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L14) + +#### show\_engagement\_panel\_endpoint + +> **show\_engagement\_panel\_endpoint**: `object` + +##### show\_engagement\_panel\_endpoint.engagement\_panel + +> **engagement\_panel**: [`EngagementPanelSectionList`](EngagementPanelSectionList.md) \| `null` + +##### show\_engagement\_panel\_endpoint.engagement\_panel\_popup\_type + +> **engagement\_panel\_popup\_type**: `string` + +##### show\_engagement\_panel\_endpoint.identifier + +> **identifier**: `object` + +##### show\_engagement\_panel\_endpoint.identifier.surface + +> **surface**: `string` + +##### show\_engagement\_panel\_endpoint.identifier.tag + +> **tag**: `string` + +*** + +### renderer\_context + +> **renderer\_context**: [`RendererContext`](../../Misc/classes/RendererContext.md) + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L24) + +*** + +### truncation\_text? + +> `optional` **truncation\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DescriptionPreviewView'` + +Defined in: [src/parser/classes/DescriptionPreviewView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DescriptionPreviewView.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DescriptionPreviewView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DescriptionPreviewView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/DialogHeaderView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DialogHeaderView.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/DialogHeaderView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/DialogHeaderView.md index 64daf2a2..f5fb4311 100644 --- a/docs/api/namespaces/YTNodes/classes/DialogHeaderView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DialogHeaderView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / DialogHeaderView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DialogHeaderView # Class: DialogHeaderView +Defined in: [src/parser/classes/DialogHeaderView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogHeaderView.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new DialogHeaderView() +### Constructor -> **new DialogHeaderView**(`data`): [`DialogHeaderView`](DialogHeaderView.md) +> **new DialogHeaderView**(`data`): `DialogHeaderView` + +Defined in: [src/parser/classes/DialogHeaderView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogHeaderView.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`DialogHeaderView`](DialogHeaderView.md) +`DialogHeaderView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/DialogHeaderView.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/DialogHeaderView.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **headline**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/DialogHeaderView.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/DialogHeaderView.ts#L8) +Defined in: [src/parser/classes/DialogHeaderView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogHeaderView.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'DialogHeaderView'` +Defined in: [src/parser/classes/DialogHeaderView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogHeaderView.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/DialogHeaderView.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/DialogHeaderView.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is DialogHeaderView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DialogView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DialogView.md new file mode 100644 index 00000000..dd614ba3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DialogView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DialogView + +# Class: DialogView + +Defined in: [src/parser/classes/DialogView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogView.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DialogView**(`data`): `DialogView` + +Defined in: [src/parser/classes/DialogView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogView.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DialogView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### custom\_content + +> **custom\_content**: [`CreatePlaylistDialogFormView`](CreatePlaylistDialogFormView.md) \| [`ListView`](ListView.md) \| `null` + +Defined in: [src/parser/classes/DialogView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogView.ts#L14) + +*** + +### footer + +> **footer**: [`PanelFooterView`](PanelFooterView.md) \| [`FormFooterView`](FormFooterView.md) \| `null` + +Defined in: [src/parser/classes/DialogView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogView.ts#L13) + +*** + +### header + +> **header**: [`DialogHeaderView`](DialogHeaderView.md) \| `null` + +Defined in: [src/parser/classes/DialogView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogView.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DialogView'` + +Defined in: [src/parser/classes/DialogView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DialogView.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DialogView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DialogView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DidYouMean.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DidYouMean.md new file mode 100644 index 00000000..0b91b208 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DidYouMean.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DidYouMean + +# Class: DidYouMean + +Defined in: [src/parser/classes/DidYouMean.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DidYouMean.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DidYouMean**(`data`): `DidYouMean` + +Defined in: [src/parser/classes/DidYouMean.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DidYouMean.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DidYouMean` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### corrected\_query + +> **corrected\_query**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DidYouMean.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DidYouMean.ts#L10) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/DidYouMean.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DidYouMean.ts#L11) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/DidYouMean.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DidYouMean.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DidYouMean'` + +Defined in: [src/parser/classes/DidYouMean.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DidYouMean.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DidYouMean & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DidYouMean & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/DimChatItemAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DimChatItemAction.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/DimChatItemAction.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/DimChatItemAction.md index 22fa87b6..becd9699 100644 --- a/docs/api/namespaces/YTNodes/classes/DimChatItemAction.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DimChatItemAction.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / DimChatItemAction +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DimChatItemAction # Class: DimChatItemAction +Defined in: [src/parser/classes/livechat/DimChatItemAction.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/DimChatItemAction.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new DimChatItemAction() +### Constructor -> **new DimChatItemAction**(`data`): [`DimChatItemAction`](DimChatItemAction.md) +> **new DimChatItemAction**(`data`): `DimChatItemAction` + +Defined in: [src/parser/classes/livechat/DimChatItemAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/DimChatItemAction.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`DimChatItemAction`](DimChatItemAction.md) +`DimChatItemAction` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/livechat/DimChatItemAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/livechat/DimChatItemAction.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **client\_assigned\_id**: `string` -#### Defined in - -[src/parser/classes/livechat/DimChatItemAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/livechat/DimChatItemAction.ts#L7) +Defined in: [src/parser/classes/livechat/DimChatItemAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/DimChatItemAction.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'DimChatItemAction'` +Defined in: [src/parser/classes/livechat/DimChatItemAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/DimChatItemAction.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/livechat/DimChatItemAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/livechat/DimChatItemAction.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is DimChatItemAction & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DislikeButtonView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DislikeButtonView.md new file mode 100644 index 00000000..e0719695 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DislikeButtonView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DislikeButtonView + +# Class: DislikeButtonView + +Defined in: [src/parser/classes/DislikeButtonView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DislikeButtonView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DislikeButtonView**(`data`): `DislikeButtonView` + +Defined in: [src/parser/classes/DislikeButtonView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DislikeButtonView.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DislikeButtonView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### dislike\_entity\_key + +> **dislike\_entity\_key**: `string` + +Defined in: [src/parser/classes/DislikeButtonView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DislikeButtonView.ts#L9) + +*** + +### toggle\_button + +> **toggle\_button**: [`ToggleButtonView`](ToggleButtonView.md) \| `null` + +Defined in: [src/parser/classes/DislikeButtonView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DislikeButtonView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DislikeButtonView'` + +Defined in: [src/parser/classes/DislikeButtonView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DislikeButtonView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DislikeButtonView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DislikeButtonView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DismissableDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DismissableDialog.md new file mode 100644 index 00000000..59faa3fa --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DismissableDialog.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DismissableDialog + +# Class: DismissableDialog + +Defined in: [src/parser/classes/DismissableDialog.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialog.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DismissableDialog**(`data`): `DismissableDialog` + +Defined in: [src/parser/classes/DismissableDialog.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialog.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DismissableDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### display\_style + +> **display\_style**: `string` + +Defined in: [src/parser/classes/DismissableDialog.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialog.ts#L11) + +*** + +### metadata + +> **metadata**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/DismissableDialog.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialog.ts#L10) + +*** + +### sections + +> **sections**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`DismissableDialogContentSection`](DismissableDialogContentSection.md)\> + +Defined in: [src/parser/classes/DismissableDialog.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialog.ts#L9) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/DismissableDialog.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialog.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DismissableDialog'` + +Defined in: [src/parser/classes/DismissableDialog.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialog.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DismissableDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DismissableDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DismissableDialogContentSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DismissableDialogContentSection.md new file mode 100644 index 00000000..6f30691b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DismissableDialogContentSection.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DismissableDialogContentSection + +# Class: DismissableDialogContentSection + +Defined in: [src/parser/classes/DismissableDialogContentSection.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialogContentSection.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DismissableDialogContentSection**(`data`): `DismissableDialogContentSection` + +Defined in: [src/parser/classes/DismissableDialogContentSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialogContentSection.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DismissableDialogContentSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DismissableDialogContentSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialogContentSection.ts#L9) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DismissableDialogContentSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialogContentSection.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DismissableDialogContentSection'` + +Defined in: [src/parser/classes/DismissableDialogContentSection.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DismissableDialogContentSection.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DismissableDialogContentSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DismissableDialogContentSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DownloadButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DownloadButton.md new file mode 100644 index 00000000..95919036 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DownloadButton.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DownloadButton + +# Class: DownloadButton + +Defined in: [src/parser/classes/DownloadButton.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DownloadButton.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DownloadButton**(`data`): `DownloadButton` + +Defined in: [src/parser/classes/DownloadButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DownloadButton.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DownloadButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/DownloadButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DownloadButton.ts#L10) + +*** + +### size + +> **size**: `string` + +Defined in: [src/parser/classes/DownloadButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DownloadButton.ts#L9) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/DownloadButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DownloadButton.ts#L8) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/DownloadButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DownloadButton.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DownloadButton'` + +Defined in: [src/parser/classes/DownloadButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DownloadButton.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DownloadButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DownloadButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Dropdown.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Dropdown.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/Dropdown.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Dropdown.md index 3f5c56fc..6f54b5fb 100644 --- a/docs/api/namespaces/YTNodes/classes/Dropdown.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Dropdown.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Dropdown +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Dropdown # Class: Dropdown +Defined in: [src/parser/classes/Dropdown.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Dropdown.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Dropdown() +### Constructor -> **new Dropdown**(`data`): [`Dropdown`](Dropdown.md) +> **new Dropdown**(`data`): `Dropdown` + +Defined in: [src/parser/classes/Dropdown.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Dropdown.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Dropdown`](Dropdown.md) +`Dropdown` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Dropdown.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Dropdown.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **entries**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`DropdownItem`](DropdownItem.md)\> -#### Defined in - -[src/parser/classes/Dropdown.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Dropdown.ts#L9) +Defined in: [src/parser/classes/Dropdown.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Dropdown.ts#L9) *** @@ -44,9 +44,7 @@ > **label**: `string` -#### Defined in - -[src/parser/classes/Dropdown.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Dropdown.ts#L8) +Defined in: [src/parser/classes/Dropdown.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Dropdown.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Dropdown'` +Defined in: [src/parser/classes/Dropdown.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Dropdown.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Dropdown.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Dropdown.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Dropdown & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DropdownItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DropdownItem.md new file mode 100644 index 00000000..539ffc41 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DropdownItem.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DropdownItem + +# Class: DropdownItem + +Defined in: [src/parser/classes/DropdownItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DropdownItem**(`data`): `DropdownItem` + +Defined in: [src/parser/classes/DropdownItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DropdownItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description? + +> `optional` **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DropdownItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L13) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/DropdownItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L14) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/DropdownItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L12) + +*** + +### label + +> **label**: `string` + +Defined in: [src/parser/classes/DropdownItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L9) + +*** + +### selected + +> **selected**: `boolean` + +Defined in: [src/parser/classes/DropdownItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### value? + +> `optional` **value**: `string` \| `number` + +Defined in: [src/parser/classes/DropdownItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L11) + +*** + +### type + +> `static` **type**: `string` = `'DropdownItem'` + +Defined in: [src/parser/classes/DropdownItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DropdownItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DropdownItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DropdownView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DropdownView.md new file mode 100644 index 00000000..d545595c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DropdownView.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DropdownView + +# Class: DropdownView + +Defined in: [src/parser/classes/DropdownView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L17) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DropdownView**(`data`): `DropdownView` + +Defined in: [src/parser/classes/DropdownView.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L27) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DropdownView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### disabled + +> **disabled**: `boolean` + +Defined in: [src/parser/classes/DropdownView.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L22) + +*** + +### dropdown\_type + +> **dropdown\_type**: `string` + +Defined in: [src/parser/classes/DropdownView.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L24) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/DropdownView.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L25) + +*** + +### label + +> **label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DropdownView.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L20) + +*** + +### options? + +> `optional` **options**: `Option`[] + +Defined in: [src/parser/classes/DropdownView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L23) + +*** + +### placeholder\_text + +> **placeholder\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DropdownView.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L21) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DropdownView'` + +Defined in: [src/parser/classes/DropdownView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DropdownView.ts#L18) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DropdownView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DropdownView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/DynamicTextView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/DynamicTextView.md new file mode 100644 index 00000000..afa20a0a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/DynamicTextView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / DynamicTextView + +# Class: DynamicTextView + +Defined in: [src/parser/classes/DynamicTextView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DynamicTextView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new DynamicTextView**(`data`): `DynamicTextView` + +Defined in: [src/parser/classes/DynamicTextView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DynamicTextView.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`DynamicTextView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### max\_lines + +> **max\_lines**: `number` + +Defined in: [src/parser/classes/DynamicTextView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DynamicTextView.ts#L9) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/DynamicTextView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DynamicTextView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'DynamicTextView'` + +Defined in: [src/parser/classes/DynamicTextView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/DynamicTextView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is DynamicTextView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is DynamicTextView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Element.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Element.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/Element.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Element.md index b41ba1c0..1c86f485 100644 --- a/docs/api/namespaces/YTNodes/classes/Element.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Element.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Element +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Element # Class: Element +Defined in: [src/parser/classes/Element.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Element.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Element() +### Constructor -> **new Element**(`data`): [`Element`](Element.md) +> **new Element**(`data`): `Element` + +Defined in: [src/parser/classes/Element.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Element.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Element`](Element.md) +`Element` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Element.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Element.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > `optional` **child\_elements**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChildElement`](../../Misc/classes/ChildElement.md)\> -#### Defined in - -[src/parser/classes/Element.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Element.ts#L9) +Defined in: [src/parser/classes/Element.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Element.ts#L9) *** @@ -44,9 +44,7 @@ > `optional` **model**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/Element.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Element.ts#L8) +Defined in: [src/parser/classes/Element.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Element.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Element'` +Defined in: [src/parser/classes/Element.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Element.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Element.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Element.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Element & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EmergencyOnebox.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmergencyOnebox.md new file mode 100644 index 00000000..1b68acda --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmergencyOnebox.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EmergencyOnebox + +# Class: EmergencyOnebox + +Defined in: [src/parser/classes/EmergencyOnebox.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmergencyOnebox.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EmergencyOnebox**(`data`): `EmergencyOnebox` + +Defined in: [src/parser/classes/EmergencyOnebox.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmergencyOnebox.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EmergencyOnebox` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### first\_option + +> **first\_option**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/EmergencyOnebox.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmergencyOnebox.ts#L10) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/EmergencyOnebox.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmergencyOnebox.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EmergencyOnebox.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmergencyOnebox.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'EmergencyOnebox'` + +Defined in: [src/parser/classes/EmergencyOnebox.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmergencyOnebox.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EmergencyOnebox & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EmergencyOnebox & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPicker.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPicker.md new file mode 100644 index 00000000..50ebc10b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPicker.md @@ -0,0 +1,319 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EmojiPicker + +# Class: EmojiPicker + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EmojiPicker**(`data`): `EmojiPicker` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EmojiPicker` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### categories + +> **categories**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L10) + +*** + +### category\_buttons + +> **category\_buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L11) + +*** + +### clear\_search\_label + +> **clear\_search\_label**: `string` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L15) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L9) + +*** + +### pick\_skin\_tone + +> **pick\_skin\_tone**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L14) + +*** + +### search\_no\_results + +> **search\_no\_results**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L13) + +*** + +### search\_placeholder + +> **search\_placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L12) + +*** + +### skin\_tone\_dark\_label + +> **skin\_tone\_dark\_label**: `string` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L21) + +*** + +### skin\_tone\_generic\_label + +> **skin\_tone\_generic\_label**: `string` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L16) + +*** + +### skin\_tone\_light\_label + +> **skin\_tone\_light\_label**: `string` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L17) + +*** + +### skin\_tone\_medium\_dark\_label + +> **skin\_tone\_medium\_dark\_label**: `string` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L20) + +*** + +### skin\_tone\_medium\_label + +> **skin\_tone\_medium\_label**: `string` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L19) + +*** + +### skin\_tone\_medium\_light\_label + +> **skin\_tone\_medium\_light\_label**: `string` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'EmojiPicker'` + +Defined in: [src/parser/classes/comments/EmojiPicker.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/EmojiPicker.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EmojiPicker & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EmojiPicker & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerCategory.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerCategory.md new file mode 100644 index 00000000..e4bb1dce --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerCategory.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EmojiPickerCategory + +# Class: EmojiPickerCategory + +Defined in: [src/parser/classes/EmojiPickerCategory.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategory.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EmojiPickerCategory**(`data`): `EmojiPickerCategory` + +Defined in: [src/parser/classes/EmojiPickerCategory.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategory.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EmojiPickerCategory` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### category\_id + +> **category\_id**: `string` + +Defined in: [src/parser/classes/EmojiPickerCategory.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategory.ts#L8) + +*** + +### category\_type + +> **category\_type**: `string` + +Defined in: [src/parser/classes/EmojiPickerCategory.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategory.ts#L12) + +*** + +### emoji\_ids + +> **emoji\_ids**: `string`[] + +Defined in: [src/parser/classes/EmojiPickerCategory.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategory.ts#L10) + +*** + +### image\_loading\_lazy + +> **image\_loading\_lazy**: `boolean` + +Defined in: [src/parser/classes/EmojiPickerCategory.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategory.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EmojiPickerCategory.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategory.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'EmojiPickerCategory'` + +Defined in: [src/parser/classes/EmojiPickerCategory.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategory.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EmojiPickerCategory & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EmojiPickerCategory & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerCategoryButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerCategoryButton.md new file mode 100644 index 00000000..9e3ed625 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerCategoryButton.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EmojiPickerCategoryButton + +# Class: EmojiPickerCategoryButton + +Defined in: [src/parser/classes/EmojiPickerCategoryButton.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategoryButton.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EmojiPickerCategoryButton**(`data`): `EmojiPickerCategoryButton` + +Defined in: [src/parser/classes/EmojiPickerCategoryButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategoryButton.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EmojiPickerCategoryButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### category\_id + +> **category\_id**: `string` + +Defined in: [src/parser/classes/EmojiPickerCategoryButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategoryButton.ts#L7) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/EmojiPickerCategoryButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategoryButton.ts#L8) + +*** + +### tooltip + +> **tooltip**: `string` + +Defined in: [src/parser/classes/EmojiPickerCategoryButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategoryButton.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'EmojiPickerCategoryButton'` + +Defined in: [src/parser/classes/EmojiPickerCategoryButton.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerCategoryButton.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EmojiPickerCategoryButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EmojiPickerCategoryButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerUpsellCategory.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerUpsellCategory.md new file mode 100644 index 00000000..16408f7f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EmojiPickerUpsellCategory.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EmojiPickerUpsellCategory + +# Class: EmojiPickerUpsellCategory + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EmojiPickerUpsellCategory**(`data`): `EmojiPickerUpsellCategory` + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EmojiPickerUpsellCategory` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### category\_id + +> **category\_id**: `string` + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L9) + +*** + +### emoji\_ids + +> **emoji\_ids**: `string`[] + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L14) + +*** + +### emoji\_tooltip + +> **emoji\_tooltip**: `string` + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### upsell + +> **upsell**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L11) + +*** + +### type + +> `static` **type**: `string` = `'EmojiPickerUpsellCategory'` + +Defined in: [src/parser/classes/EmojiPickerUpsellCategory.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EmojiPickerUpsellCategory.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EmojiPickerUpsellCategory & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EmojiPickerUpsellCategory & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EndScreenPlaylist.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EndScreenPlaylist.md new file mode 100644 index 00000000..5acf1662 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EndScreenPlaylist.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EndScreenPlaylist + +# Class: EndScreenPlaylist + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EndScreenPlaylist**(`data`): `EndScreenPlaylist` + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EndScreenPlaylist` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L13) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L10) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L14) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L15) + +*** + +### type + +> `static` **type**: `string` = `'EndScreenPlaylist'` + +Defined in: [src/parser/classes/EndScreenPlaylist.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenPlaylist.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EndScreenPlaylist & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EndScreenPlaylist & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EndScreenVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EndScreenVideo.md new file mode 100644 index 00000000..41769821 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EndScreenVideo.md @@ -0,0 +1,295 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EndScreenVideo + +# Class: EndScreenVideo + +Defined in: [src/parser/classes/EndScreenVideo.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EndScreenVideo**(`data`): `EndScreenVideo` + +Defined in: [src/parser/classes/EndScreenVideo.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L24) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EndScreenVideo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/EndScreenVideo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L15) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/EndScreenVideo.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L18) + +*** + +### duration + +> **duration**: `object` + +Defined in: [src/parser/classes/EndScreenVideo.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L19) + +#### seconds + +> **seconds**: `number` + +#### text + +> **text**: `string` + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/EndScreenVideo.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L16) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/EndScreenVideo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L11) + +*** + +### short\_view\_count + +> **short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndScreenVideo.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L17) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/EndScreenVideo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L14) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/EndScreenVideo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndScreenVideo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'EndScreenVideo'` + +Defined in: [src/parser/classes/EndScreenVideo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndScreenVideo.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EndScreenVideo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EndScreenVideo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Endscreen.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Endscreen.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/Endscreen.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Endscreen.md index 931891c0..09c11bf4 100644 --- a/docs/api/namespaces/YTNodes/classes/Endscreen.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Endscreen.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Endscreen +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Endscreen # Class: Endscreen +Defined in: [src/parser/classes/Endscreen.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Endscreen.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Endscreen() +### Constructor -> **new Endscreen**(`data`): [`Endscreen`](Endscreen.md) +> **new Endscreen**(`data`): `Endscreen` + +Defined in: [src/parser/classes/Endscreen.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Endscreen.ts#L10) #### Parameters -• **data**: `any` +##### data + +`any` #### Returns -[`Endscreen`](Endscreen.md) +`Endscreen` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Endscreen.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Endscreen.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **elements**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/Endscreen.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Endscreen.ts#L7) +Defined in: [src/parser/classes/Endscreen.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Endscreen.ts#L7) *** @@ -44,9 +44,7 @@ > **start\_ms**: `string` -#### Defined in - -[src/parser/classes/Endscreen.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Endscreen.ts#L8) +Defined in: [src/parser/classes/Endscreen.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Endscreen.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Endscreen'` +Defined in: [src/parser/classes/Endscreen.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Endscreen.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Endscreen.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Endscreen.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Endscreen & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EndscreenElement.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EndscreenElement.md new file mode 100644 index 00000000..0ddc9bb7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EndscreenElement.md @@ -0,0 +1,359 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EndscreenElement + +# Class: EndscreenElement + +Defined in: [src/parser/classes/EndscreenElement.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EndscreenElement**(`data`): `EndscreenElement` + +Defined in: [src/parser/classes/EndscreenElement.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L29) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EndscreenElement` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### aspect\_ratio + +> **aspect\_ratio**: `number` + +Defined in: [src/parser/classes/EndscreenElement.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L24) + +*** + +### call\_to\_action? + +> `optional` **call\_to\_action**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndscreenElement.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L16) + +*** + +### end\_ms + +> **end\_ms**: `number` + +Defined in: [src/parser/classes/EndscreenElement.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L26) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/EndscreenElement.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L12) + +*** + +### hovercard\_button? + +> `optional` **hovercard\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/EndscreenElement.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L17) + +*** + +### icon? + +> `optional` **icon**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/EndscreenElement.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L14) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/EndscreenElement.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L27) + +*** + +### image? + +> `optional` **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/EndscreenElement.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L13) + +*** + +### is\_subscribe? + +> `optional` **is\_subscribe**: `boolean` + +Defined in: [src/parser/classes/EndscreenElement.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L18) + +*** + +### left + +> **left**: `number` + +Defined in: [src/parser/classes/EndscreenElement.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L21) + +*** + +### metadata? + +> `optional` **metadata**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndscreenElement.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L15) + +*** + +### playlist\_length? + +> `optional` **playlist\_length**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndscreenElement.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L19) + +*** + +### start\_ms + +> **start\_ms**: `number` + +Defined in: [src/parser/classes/EndscreenElement.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L25) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/EndscreenElement.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L10) + +*** + +### thumbnail\_overlays? + +> `optional` **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/EndscreenElement.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L20) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EndscreenElement.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L11) + +*** + +### top + +> **top**: `number` + +Defined in: [src/parser/classes/EndscreenElement.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L22) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### width + +> **width**: `number` + +Defined in: [src/parser/classes/EndscreenElement.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L23) + +*** + +### type + +> `static` **type**: `string` = `'EndscreenElement'` + +Defined in: [src/parser/classes/EndscreenElement.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EndscreenElement.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EndscreenElement & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EndscreenElement & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EngagementPanelSectionList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EngagementPanelSectionList.md new file mode 100644 index 00000000..95ff4e23 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EngagementPanelSectionList.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EngagementPanelSectionList + +# Class: EngagementPanelSectionList + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L12) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EngagementPanelSectionList**(`data`): `EngagementPanelSectionList` + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L25) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EngagementPanelSectionList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`SectionList`](SectionList.md) \| [`VideoAttributeView`](VideoAttributeView.md) \| [`ContinuationItem`](ContinuationItem.md) \| [`ClipSection`](ClipSection.md) \| [`MacroMarkersList`](MacroMarkersList.md) \| [`ProductList`](ProductList.md) \| [`StructuredDescriptionContent`](StructuredDescriptionContent.md) \| `null` + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L16) + +*** + +### header + +> **header**: [`EngagementPanelTitleHeader`](EngagementPanelTitleHeader.md) \| `null` + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L15) + +*** + +### identifier? + +> `optional` **identifier**: `object` + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L19) + +#### surface + +> **surface**: `string` + +#### tag + +> **tag**: `string` + +*** + +### panel\_identifier? + +> `optional` **panel\_identifier**: `string` + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L18) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L17) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### visibility? + +> `optional` **visibility**: `string` + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L23) + +*** + +### type + +> `static` **type**: `string` = `'EngagementPanelSectionList'` + +Defined in: [src/parser/classes/EngagementPanelSectionList.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelSectionList.ts#L13) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EngagementPanelSectionList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EngagementPanelSectionList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EngagementPanelTitleHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EngagementPanelTitleHeader.md new file mode 100644 index 00000000..4fb1a03d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EngagementPanelTitleHeader.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EngagementPanelTitleHeader + +# Class: EngagementPanelTitleHeader + +Defined in: [src/parser/classes/EngagementPanelTitleHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelTitleHeader.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EngagementPanelTitleHeader**(`data`): `EngagementPanelTitleHeader` + +Defined in: [src/parser/classes/EngagementPanelTitleHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelTitleHeader.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EngagementPanelTitleHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contextual\_info? + +> `optional` **contextual\_info**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EngagementPanelTitleHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelTitleHeader.ts#L11) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/EngagementPanelTitleHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelTitleHeader.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EngagementPanelTitleHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelTitleHeader.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### visibility\_button + +> **visibility\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/EngagementPanelTitleHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelTitleHeader.ts#L10) + +*** + +### type + +> `static` **type**: `string` = `'EngagementPanelTitleHeader'` + +Defined in: [src/parser/classes/EngagementPanelTitleHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EngagementPanelTitleHeader.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EngagementPanelTitleHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EngagementPanelTitleHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/EomSettingsDisclaimer.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/EomSettingsDisclaimer.md new file mode 100644 index 00000000..5c8ca4f7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/EomSettingsDisclaimer.md @@ -0,0 +1,243 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / EomSettingsDisclaimer + +# Class: EomSettingsDisclaimer + +Defined in: [src/parser/classes/EomSettingsDisclaimer.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EomSettingsDisclaimer.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new EomSettingsDisclaimer**(`data`): `EomSettingsDisclaimer` + +Defined in: [src/parser/classes/EomSettingsDisclaimer.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EomSettingsDisclaimer.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`EomSettingsDisclaimer` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### disclaimer + +> **disclaimer**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/EomSettingsDisclaimer.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EomSettingsDisclaimer.ts#L8) + +*** + +### info\_icon + +> **info\_icon**: `object` + +Defined in: [src/parser/classes/EomSettingsDisclaimer.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EomSettingsDisclaimer.ts#L9) + +#### icon\_type + +> **icon\_type**: `string` + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### usage\_scenario + +> **usage\_scenario**: `string` + +Defined in: [src/parser/classes/EomSettingsDisclaimer.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EomSettingsDisclaimer.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'EomSettingsDisclaimer'` + +Defined in: [src/parser/classes/EomSettingsDisclaimer.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/EomSettingsDisclaimer.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is EomSettingsDisclaimer & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is EomSettingsDisclaimer & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableMetadata.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableMetadata.md new file mode 100644 index 00000000..fcdd380c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableMetadata.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ExpandableMetadata + +# Class: ExpandableMetadata + +Defined in: [src/parser/classes/ExpandableMetadata.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableMetadata.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ExpandableMetadata**(`data`): `ExpandableMetadata` + +Defined in: [src/parser/classes/ExpandableMetadata.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableMetadata.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ExpandableMetadata` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### collapse\_button + +> **collapse\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ExpandableMetadata.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableMetadata.ts#L21) + +*** + +### expand\_button + +> **expand\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ExpandableMetadata.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableMetadata.ts#L20) + +*** + +### expanded\_content + +> **expanded\_content**: [`HorizontalCardList`](HorizontalCardList.md) \| [`HorizontalList`](HorizontalList.md) \| `null` + +Defined in: [src/parser/classes/ExpandableMetadata.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableMetadata.ts#L19) + +*** + +### header? + +> `optional` **header**: `object` + +Defined in: [src/parser/classes/ExpandableMetadata.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableMetadata.ts#L12) + +#### collapsed\_label + +> **collapsed\_label**: [`Text`](../../Misc/classes/Text.md) + +#### collapsed\_thumbnail + +> **collapsed\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +#### collapsed\_title + +> **collapsed\_title**: [`Text`](../../Misc/classes/Text.md) + +#### expanded\_title + +> **expanded\_title**: [`Text`](../../Misc/classes/Text.md) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ExpandableMetadata'` + +Defined in: [src/parser/classes/ExpandableMetadata.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableMetadata.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ExpandableMetadata & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ExpandableMetadata & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableTab.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableTab.md new file mode 100644 index 00000000..47208197 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableTab.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ExpandableTab + +# Class: ExpandableTab + +Defined in: [src/parser/classes/ExpandableTab.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableTab.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ExpandableTab**(`data`): `ExpandableTab` + +Defined in: [src/parser/classes/ExpandableTab.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableTab.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ExpandableTab` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/ExpandableTab.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableTab.ts#L11) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ExpandableTab.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableTab.ts#L9) + +*** + +### selected + +> **selected**: `boolean` + +Defined in: [src/parser/classes/ExpandableTab.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableTab.ts#L10) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/ExpandableTab.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableTab.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ExpandableTab'` + +Defined in: [src/parser/classes/ExpandableTab.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableTab.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ExpandableTab & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ExpandableTab & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableVideoDescriptionBody.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableVideoDescriptionBody.md new file mode 100644 index 00000000..c18d141a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandableVideoDescriptionBody.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ExpandableVideoDescriptionBody + +# Class: ExpandableVideoDescriptionBody + +Defined in: [src/parser/classes/ExpandableVideoDescriptionBody.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableVideoDescriptionBody.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ExpandableVideoDescriptionBody**(`data`): `ExpandableVideoDescriptionBody` + +Defined in: [src/parser/classes/ExpandableVideoDescriptionBody.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableVideoDescriptionBody.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ExpandableVideoDescriptionBody` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### attributed\_description\_body\_text? + +> `optional` **attributed\_description\_body\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ExpandableVideoDescriptionBody.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableVideoDescriptionBody.ts#L11) + +*** + +### show\_less\_text + +> **show\_less\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ExpandableVideoDescriptionBody.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableVideoDescriptionBody.ts#L10) + +*** + +### show\_more\_text + +> **show\_more\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ExpandableVideoDescriptionBody.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableVideoDescriptionBody.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ExpandableVideoDescriptionBody'` + +Defined in: [src/parser/classes/ExpandableVideoDescriptionBody.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandableVideoDescriptionBody.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ExpandableVideoDescriptionBody & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ExpandableVideoDescriptionBody & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandedShelfContents.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandedShelfContents.md new file mode 100644 index 00000000..37cd7c25 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ExpandedShelfContents.md @@ -0,0 +1,237 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ExpandedShelfContents + +# Class: ExpandedShelfContents + +Defined in: [src/parser/classes/ExpandedShelfContents.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandedShelfContents.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ExpandedShelfContents**(`data`): `ExpandedShelfContents` + +Defined in: [src/parser/classes/ExpandedShelfContents.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandedShelfContents.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ExpandedShelfContents` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ExpandedShelfContents.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandedShelfContents.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ExpandedShelfContents'` + +Defined in: [src/parser/classes/ExpandedShelfContents.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandedShelfContents.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ExpandedShelfContents.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ExpandedShelfContents.ts#L15) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ExpandedShelfContents & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ExpandedShelfContents & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Factoid.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Factoid.md new file mode 100644 index 00000000..bd9d846b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Factoid.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Factoid + +# Class: Factoid + +Defined in: [src/parser/classes/Factoid.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Factoid.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Factoid**(`data`): `Factoid` + +Defined in: [src/parser/classes/Factoid.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Factoid.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Factoid` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility\_text + +> **accessibility\_text**: `string` + +Defined in: [src/parser/classes/Factoid.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Factoid.ts#L10) + +*** + +### label + +> **label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Factoid.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Factoid.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### value + +> **value**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Factoid.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Factoid.ts#L9) + +*** + +### type + +> `static` **type**: `string` = `'Factoid'` + +Defined in: [src/parser/classes/Factoid.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Factoid.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Factoid & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Factoid & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/FancyDismissibleDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/FancyDismissibleDialog.md new file mode 100644 index 00000000..a9d0337e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/FancyDismissibleDialog.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / FancyDismissibleDialog + +# Class: FancyDismissibleDialog + +Defined in: [src/parser/classes/FancyDismissibleDialog.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FancyDismissibleDialog.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new FancyDismissibleDialog**(`data`): `FancyDismissibleDialog` + +Defined in: [src/parser/classes/FancyDismissibleDialog.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FancyDismissibleDialog.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`FancyDismissibleDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### confirm\_label + +> **confirm\_label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/FancyDismissibleDialog.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FancyDismissibleDialog.ts#L9) + +*** + +### dialog\_message + +> **dialog\_message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/FancyDismissibleDialog.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FancyDismissibleDialog.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'FancyDismissibleDialog'` + +Defined in: [src/parser/classes/FancyDismissibleDialog.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FancyDismissibleDialog.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is FancyDismissibleDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is FancyDismissibleDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/FeedFilterChipBar.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedFilterChipBar.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/FeedFilterChipBar.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/FeedFilterChipBar.md index 4efa31e4..0a0ac1f2 100644 --- a/docs/api/namespaces/YTNodes/classes/FeedFilterChipBar.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedFilterChipBar.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / FeedFilterChipBar +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / FeedFilterChipBar # Class: FeedFilterChipBar +Defined in: [src/parser/classes/FeedFilterChipBar.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedFilterChipBar.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new FeedFilterChipBar() +### Constructor -> **new FeedFilterChipBar**(`data`): [`FeedFilterChipBar`](FeedFilterChipBar.md) +> **new FeedFilterChipBar**(`data`): `FeedFilterChipBar` + +Defined in: [src/parser/classes/FeedFilterChipBar.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedFilterChipBar.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`FeedFilterChipBar`](FeedFilterChipBar.md) +`FeedFilterChipBar` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/FeedFilterChipBar.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/FeedFilterChipBar.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ChipCloudChip`](ChipCloudChip.md)\> -#### Defined in - -[src/parser/classes/FeedFilterChipBar.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/FeedFilterChipBar.ts#L8) +Defined in: [src/parser/classes/FeedFilterChipBar.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedFilterChipBar.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'FeedFilterChipBar'` +Defined in: [src/parser/classes/FeedFilterChipBar.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedFilterChipBar.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/FeedFilterChipBar.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/FeedFilterChipBar.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is FeedFilterChipBar & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedNudge.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedNudge.md new file mode 100644 index 00000000..cc0644f4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedNudge.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / FeedNudge + +# Class: FeedNudge + +Defined in: [src/parser/classes/FeedNudge.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new FeedNudge**(`data`): `FeedNudge` + +Defined in: [src/parser/classes/FeedNudge.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`FeedNudge` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### apply\_modernized\_style + +> **apply\_modernized\_style**: `boolean` + +Defined in: [src/parser/classes/FeedNudge.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L13) + +*** + +### background\_style + +> **background\_style**: `string` + +Defined in: [src/parser/classes/FeedNudge.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L15) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/FeedNudge.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L12) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/FeedNudge.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/FeedNudge.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L10) + +*** + +### trim\_style + +> **trim\_style**: `string` + +Defined in: [src/parser/classes/FeedNudge.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'FeedNudge'` + +Defined in: [src/parser/classes/FeedNudge.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedNudge.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is FeedNudge & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is FeedNudge & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/FeedTabbedHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedTabbedHeader.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/FeedTabbedHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/FeedTabbedHeader.md index 30b33374..44c8c75f 100644 --- a/docs/api/namespaces/YTNodes/classes/FeedTabbedHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedTabbedHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / FeedTabbedHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / FeedTabbedHeader # Class: FeedTabbedHeader +Defined in: [src/parser/classes/FeedTabbedHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedTabbedHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new FeedTabbedHeader() +### Constructor -> **new FeedTabbedHeader**(`data`): [`FeedTabbedHeader`](FeedTabbedHeader.md) +> **new FeedTabbedHeader**(`data`): `FeedTabbedHeader` + +Defined in: [src/parser/classes/FeedTabbedHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedTabbedHeader.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`FeedTabbedHeader`](FeedTabbedHeader.md) +`FeedTabbedHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/FeedTabbedHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/FeedTabbedHeader.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/FeedTabbedHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/FeedTabbedHeader.ts#L8) +Defined in: [src/parser/classes/FeedTabbedHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedTabbedHeader.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'FeedTabbedHeader'` +Defined in: [src/parser/classes/FeedTabbedHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FeedTabbedHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/FeedTabbedHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/FeedTabbedHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is FeedTabbedHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedbackEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedbackEndpoint.md new file mode 100644 index 00000000..741ad246 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/FeedbackEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / FeedbackEndpoint + +# Class: FeedbackEndpoint + +Defined in: [src/parser/classes/endpoints/FeedbackEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/FeedbackEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`FeedbackRequest`](../../../../type-aliases/FeedbackRequest.md)\> + +## Constructors + +### Constructor + +> **new FeedbackEndpoint**(`data`): `FeedbackEndpoint` + +Defined in: [src/parser/classes/endpoints/FeedbackEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/FeedbackEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`FeedbackEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'FeedbackEndpoint'` + +Defined in: [src/parser/classes/endpoints/FeedbackEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/FeedbackEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`FeedbackRequest`](../../../../type-aliases/FeedbackRequest.md) + +Defined in: [src/parser/classes/endpoints/FeedbackEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/FeedbackEndpoint.ts#L20) + +#### Returns + +[`FeedbackRequest`](../../../../type-aliases/FeedbackRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/FeedbackEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/FeedbackEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is FeedbackEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is FeedbackEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/FlexibleActionsView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/FlexibleActionsView.md new file mode 100644 index 00000000..08e745b3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/FlexibleActionsView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / FlexibleActionsView + +# Class: FlexibleActionsView + +Defined in: [src/parser/classes/FlexibleActionsView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FlexibleActionsView.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new FlexibleActionsView**(`data`): `FlexibleActionsView` + +Defined in: [src/parser/classes/FlexibleActionsView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FlexibleActionsView.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`FlexibleActionsView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### actions\_rows + +> **actions\_rows**: `ActionRow`[] + +Defined in: [src/parser/classes/FlexibleActionsView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FlexibleActionsView.ts#L13) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/FlexibleActionsView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FlexibleActionsView.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'FlexibleActionsView'` + +Defined in: [src/parser/classes/FlexibleActionsView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FlexibleActionsView.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is FlexibleActionsView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is FlexibleActionsView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Form.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Form.md new file mode 100644 index 00000000..b141461f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Form.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Form + +# Class: Form + +Defined in: [src/parser/classes/Form.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Form.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Form**(`data`): `Form` + +Defined in: [src/parser/classes/Form.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Form.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Form` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### fields + +> **fields**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ToggleFormField`](ToggleFormField.md)\> + +Defined in: [src/parser/classes/Form.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Form.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Form'` + +Defined in: [src/parser/classes/Form.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Form.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Form & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Form & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/FormFooterView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/FormFooterView.md new file mode 100644 index 00000000..03720f45 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/FormFooterView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / FormFooterView + +# Class: FormFooterView + +Defined in: [src/parser/classes/FormFooterView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormFooterView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new FormFooterView**(`data`): `FormFooterView` + +Defined in: [src/parser/classes/FormFooterView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormFooterView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`FormFooterView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### container\_type + +> **container\_type**: `string` + +Defined in: [src/parser/classes/FormFooterView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormFooterView.ts#L10) + +*** + +### form\_id + +> **form\_id**: `string` + +Defined in: [src/parser/classes/FormFooterView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormFooterView.ts#L9) + +*** + +### panel\_footer + +> **panel\_footer**: [`PanelFooterView`](PanelFooterView.md) \| `null` + +Defined in: [src/parser/classes/FormFooterView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormFooterView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'FormFooterView'` + +Defined in: [src/parser/classes/FormFooterView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormFooterView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is FormFooterView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is FormFooterView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/FormPopup.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/FormPopup.md new file mode 100644 index 00000000..c8194e12 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/FormPopup.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / FormPopup + +# Class: FormPopup + +Defined in: [src/parser/classes/FormPopup.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormPopup.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new FormPopup**(`data`): `FormPopup` + +Defined in: [src/parser/classes/FormPopup.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormPopup.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`FormPopup` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### buttons + +> **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md)\> + +Defined in: [src/parser/classes/FormPopup.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormPopup.ts#L13) + +*** + +### form + +> **form**: [`Form`](Form.md) \| `null` + +Defined in: [src/parser/classes/FormPopup.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormPopup.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/FormPopup.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormPopup.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'FormPopup'` + +Defined in: [src/parser/classes/FormPopup.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/FormPopup.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is FormPopup & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is FormPopup & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/GameCard.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GameCard.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/GameCard.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/GameCard.md index 52ad69ad..fcbfc2c3 100644 --- a/docs/api/namespaces/YTNodes/classes/GameCard.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GameCard.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / GameCard +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GameCard # Class: GameCard +Defined in: [src/parser/classes/GameCard.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameCard.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new GameCard() +### Constructor -> **new GameCard**(`data`): [`GameCard`](GameCard.md) +> **new GameCard**(`data`): `GameCard` + +Defined in: [src/parser/classes/GameCard.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameCard.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`GameCard`](GameCard.md) +`GameCard` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/GameCard.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GameCard.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **game**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/GameCard.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GameCard.ts#L7) +Defined in: [src/parser/classes/GameCard.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameCard.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'GameCard'` +Defined in: [src/parser/classes/GameCard.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameCard.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/GameCard.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GameCard.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is GameCard & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GameDetails.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GameDetails.md new file mode 100644 index 00000000..9ee7b612 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GameDetails.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GameDetails + +# Class: GameDetails + +Defined in: [src/parser/classes/GameDetails.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameDetails.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GameDetails**(`data`): `GameDetails` + +Defined in: [src/parser/classes/GameDetails.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameDetails.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GameDetails` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### box\_art + +> **box\_art**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/GameDetails.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameDetails.ts#L11) + +*** + +### box\_art\_overlay\_text + +> **box\_art\_overlay\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GameDetails.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameDetails.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GameDetails.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameDetails.ts#L13) + +*** + +### is\_official\_box\_art + +> **is\_official\_box\_art**: `boolean` + +Defined in: [src/parser/classes/GameDetails.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameDetails.ts#L14) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GameDetails.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameDetails.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GameDetails'` + +Defined in: [src/parser/classes/GameDetails.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GameDetails.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GameDetails & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GameDetails & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GetAccountsListInnertubeEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GetAccountsListInnertubeEndpoint.md new file mode 100644 index 00000000..40ce51d4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GetAccountsListInnertubeEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GetAccountsListInnertubeEndpoint + +# Class: GetAccountsListInnertubeEndpoint + +Defined in: [src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`GetAccountsListInnertubeRequest`](../../../../type-aliases/GetAccountsListInnertubeRequest.md)\> + +## Constructors + +### Constructor + +> **new GetAccountsListInnertubeEndpoint**(`data`): `GetAccountsListInnertubeEndpoint` + +Defined in: [src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GetAccountsListInnertubeEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GetAccountsListInnertubeEndpoint'` + +Defined in: [src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`GetAccountsListInnertubeRequest`](../../../../type-aliases/GetAccountsListInnertubeRequest.md) + +Defined in: [src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts#L20) + +#### Returns + +[`GetAccountsListInnertubeRequest`](../../../../type-aliases/GetAccountsListInnertubeRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/GetAccountsListInnertubeEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GetAccountsListInnertubeEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GetAccountsListInnertubeEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GetKidsBlocklistPickerCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GetKidsBlocklistPickerCommand.md new file mode 100644 index 00000000..e4aa7f24 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GetKidsBlocklistPickerCommand.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GetKidsBlocklistPickerCommand + +# Class: GetKidsBlocklistPickerCommand + +Defined in: [src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`GetKidsBlocklistPickerRequest`](../../../../type-aliases/GetKidsBlocklistPickerRequest.md)\> + +## Constructors + +### Constructor + +> **new GetKidsBlocklistPickerCommand**(`data`): `GetKidsBlocklistPickerCommand` + +Defined in: [src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GetKidsBlocklistPickerCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GetKidsBlocklistPickerCommand'` + +Defined in: [src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`GetKidsBlocklistPickerRequest`](../../../../type-aliases/GetKidsBlocklistPickerRequest.md) + +Defined in: [src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts#L20) + +#### Returns + +[`GetKidsBlocklistPickerRequest`](../../../../type-aliases/GetKidsBlocklistPickerRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/GetKidsBlocklistPickerCommand.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GetKidsBlocklistPickerCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GetKidsBlocklistPickerCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GetMultiPageMenuAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GetMultiPageMenuAction.md new file mode 100644 index 00000000..d7d81acc --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GetMultiPageMenuAction.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GetMultiPageMenuAction + +# Class: GetMultiPageMenuAction + +Defined in: [src/parser/classes/actions/GetMultiPageMenuAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/GetMultiPageMenuAction.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GetMultiPageMenuAction**(`data`): `GetMultiPageMenuAction` + +Defined in: [src/parser/classes/actions/GetMultiPageMenuAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/GetMultiPageMenuAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GetMultiPageMenuAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### menu + +> **menu**: [`MultiPageMenu`](MultiPageMenu.md) \| `null` + +Defined in: [src/parser/classes/actions/GetMultiPageMenuAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/GetMultiPageMenuAction.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GetMultiPageMenuAction'` + +Defined in: [src/parser/classes/actions/GetMultiPageMenuAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/GetMultiPageMenuAction.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GetMultiPageMenuAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GetMultiPageMenuAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Grid.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Grid.md new file mode 100644 index 00000000..99c7d28e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Grid.md @@ -0,0 +1,277 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Grid + +# Class: Grid + +Defined in: [src/parser/classes/Grid.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Grid**(`data`): `Grid` + +Defined in: [src/parser/classes/Grid.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Grid` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### continuation + +> **continuation**: `string` \| `null` + +Defined in: [src/parser/classes/Grid.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L11) + +*** + +### header? + +> `optional` **header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/Grid.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L12) + +*** + +### is\_collapsible? + +> `optional` **is\_collapsible**: `boolean` + +Defined in: [src/parser/classes/Grid.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L8) + +*** + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Grid.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L7) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/Grid.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### visible\_row\_count? + +> `optional` **visible\_row\_count**: `string` + +Defined in: [src/parser/classes/Grid.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L9) + +*** + +### type + +> `static` **type**: `string` = `'Grid'` + +Defined in: [src/parser/classes/Grid.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Grid.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Grid.ts#L39) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Grid & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Grid & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GridChannel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridChannel.md new file mode 100644 index 00000000..ba14a6b3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridChannel.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GridChannel + +# Class: GridChannel + +Defined in: [src/parser/classes/GridChannel.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GridChannel**(`data`): `GridChannel` + +Defined in: [src/parser/classes/GridChannel.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GridChannel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/GridChannel.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L11) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GridChannel.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L14) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/GridChannel.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L10) + +*** + +### subscribe\_button + +> **subscribe\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/GridChannel.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L15) + +*** + +### subscribers + +> **subscribers**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridChannel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridChannel.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L13) + +*** + +### type + +> `static` **type**: `string` = `'GridChannel'` + +Defined in: [src/parser/classes/GridChannel.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridChannel.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GridChannel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GridChannel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/GridHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridHeader.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/GridHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/GridHeader.md index 7744f040..5a3ea47d 100644 --- a/docs/api/namespaces/YTNodes/classes/GridHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / GridHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GridHeader # Class: GridHeader +Defined in: [src/parser/classes/GridHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new GridHeader() +### Constructor -> **new GridHeader**(`data`): [`GridHeader`](GridHeader.md) +> **new GridHeader**(`data`): `GridHeader` + +Defined in: [src/parser/classes/GridHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridHeader.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`GridHeader`](GridHeader.md) +`GridHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/GridHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GridHeader.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/GridHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GridHeader.ts#L8) +Defined in: [src/parser/classes/GridHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridHeader.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'GridHeader'` +Defined in: [src/parser/classes/GridHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/GridHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GridHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is GridHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GridMix.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridMix.md new file mode 100644 index 00000000..40835ae6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridMix.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GridMix + +# Class: GridMix + +Defined in: [src/parser/classes/GridMix.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GridMix**(`data`): `GridMix` + +Defined in: [src/parser/classes/GridMix.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GridMix` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Text`](../../Misc/classes/Text.md) \| `null` + +Defined in: [src/parser/classes/GridMix.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GridMix.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L16) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/GridMix.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L10) + +*** + +### secondary\_endpoint + +> **secondary\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GridMix.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L17) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/GridMix.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L18) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/GridMix.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridMix.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridMix.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L14) + +*** + +### video\_count\_short + +> **video\_count\_short**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridMix.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L15) + +*** + +### type + +> `static` **type**: `string` = `'GridMix'` + +Defined in: [src/parser/classes/GridMix.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMix.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GridMix & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GridMix & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GridMovie.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridMovie.md new file mode 100644 index 00000000..d91d2142 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridMovie.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GridMovie + +# Class: GridMovie + +Defined in: [src/parser/classes/GridMovie.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GridMovie**(`data`): `GridMovie` + +Defined in: [src/parser/classes/GridMovie.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GridMovie` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MetadataBadge`](MetadataBadge.md)\> + +Defined in: [src/parser/classes/GridMovie.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L16) + +*** + +### duration + +> **duration**: [`Text`](../../Misc/classes/Text.md) \| `null` + +Defined in: [src/parser/classes/GridMovie.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GridMovie.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L15) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/GridMovie.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L11) + +*** + +### metadata + +> **metadata**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridMovie.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L17) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/GridMovie.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L18) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/GridMovie.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridMovie.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GridMovie'` + +Defined in: [src/parser/classes/GridMovie.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridMovie.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GridMovie & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GridMovie & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GridPlaylist.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridPlaylist.md new file mode 100644 index 00000000..a4aad263 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridPlaylist.md @@ -0,0 +1,303 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GridPlaylist + +# Class: GridPlaylist + +Defined in: [src/parser/classes/GridPlaylist.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GridPlaylist**(`data`): `GridPlaylist` + +Defined in: [src/parser/classes/GridPlaylist.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GridPlaylist` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author? + +> `optional` **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/GridPlaylist.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L13) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/GridPlaylist.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GridPlaylist.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L15) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/GridPlaylist.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L11) + +*** + +### sidebar\_thumbnails + +> **sidebar\_thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] \| `null` + +Defined in: [src/parser/classes/GridPlaylist.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L19) + +*** + +### thumbnail\_renderer + +> **thumbnail\_renderer**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/GridPlaylist.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L18) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/GridPlaylist.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L17) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridPlaylist.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridPlaylist.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L20) + +*** + +### video\_count\_short + +> **video\_count\_short**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridPlaylist.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L21) + +*** + +### view\_playlist + +> **view\_playlist**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridPlaylist.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L16) + +*** + +### type + +> `static` **type**: `string` = `'GridPlaylist'` + +Defined in: [src/parser/classes/GridPlaylist.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridPlaylist.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GridPlaylist & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GridPlaylist & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GridShelfView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridShelfView.md new file mode 100644 index 00000000..f8f87ac5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridShelfView.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GridShelfView + +# Class: GridShelfView + +Defined in: [src/parser/classes/GridShelfView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GridShelfView**(`data`): `GridShelfView` + +Defined in: [src/parser/classes/GridShelfView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GridShelfView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content\_aspect\_ratio + +> **content\_aspect\_ratio**: `string` + +Defined in: [src/parser/classes/GridShelfView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L11) + +*** + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/GridShelfView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L9) + +*** + +### enable\_vertical\_expansion + +> **enable\_vertical\_expansion**: `boolean` + +Defined in: [src/parser/classes/GridShelfView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L12) + +*** + +### header + +> **header**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/GridShelfView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L10) + +*** + +### min\_collapsed\_item\_count + +> **min\_collapsed\_item\_count**: `number` + +Defined in: [src/parser/classes/GridShelfView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L15) + +*** + +### show\_less\_button + +> **show\_less\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/GridShelfView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L14) + +*** + +### show\_more\_button + +> **show\_more\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/GridShelfView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GridShelfView'` + +Defined in: [src/parser/classes/GridShelfView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShelfView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GridShelfView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GridShelfView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GridShow.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridShow.md new file mode 100644 index 00000000..4a823bbb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridShow.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GridShow + +# Class: GridShow + +Defined in: [src/parser/classes/GridShow.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GridShow**(`data`): `GridShow` + +Defined in: [src/parser/classes/GridShow.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GridShow` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/GridShow.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L18) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GridShow.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L15) + +*** + +### long\_byline\_text + +> **long\_byline\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridShow.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L16) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ThumbnailOverlayBottomPanel`](ThumbnailOverlayBottomPanel.md)\> + +Defined in: [src/parser/classes/GridShow.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L17) + +*** + +### thumbnail\_renderer + +> **thumbnail\_renderer**: [`ShowCustomThumbnail`](ShowCustomThumbnail.md) \| `null` + +Defined in: [src/parser/classes/GridShow.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L14) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridShow.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GridShow'` + +Defined in: [src/parser/classes/GridShow.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridShow.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GridShow & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GridShow & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GridVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridVideo.md new file mode 100644 index 00000000..4f9de352 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GridVideo.md @@ -0,0 +1,375 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GridVideo + +# Class: GridVideo + +Defined in: [src/parser/classes/GridVideo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GridVideo**(`data`): `GridVideo` + +Defined in: [src/parser/classes/GridVideo.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L29) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GridVideo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/GridVideo.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L19) + +*** + +### buttons? + +> `optional` **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/GridVideo.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L24) + +*** + +### duration + +> **duration**: [`Text`](../../Misc/classes/Text.md) \| `null` + +Defined in: [src/parser/classes/GridVideo.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L18) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GridVideo.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L22) + +*** + +### is\_reminder\_set? + +> `optional` **is\_reminder\_set**: `boolean` + +Defined in: [src/parser/classes/GridVideo.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L27) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/GridVideo.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L23) + +*** + +### published + +> **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridVideo.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L17) + +*** + +### rich\_thumbnail + +> **rich\_thumbnail**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/GridVideo.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L16) + +*** + +### short\_view\_count + +> **short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridVideo.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L21) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/GridVideo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L15) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/GridVideo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L14) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridVideo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### upcoming? + +> `optional` **upcoming**: `Date` + +Defined in: [src/parser/classes/GridVideo.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L25) + +*** + +### upcoming\_text? + +> `optional` **upcoming\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridVideo.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L26) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/GridVideo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L12) + +*** + +### views + +> **views**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GridVideo.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L20) + +*** + +### type + +> `static` **type**: `string` = `'GridVideo'` + +Defined in: [src/parser/classes/GridVideo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### id + +#### Get Signature + +> **get** **id**(): `string` + +Defined in: [src/parser/classes/GridVideo.ts:60](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L60) + +##### Deprecated + +Use [`video_id`](#video_id) instead. + +##### Returns + +`string` + +*** + +### is\_upcoming + +#### Get Signature + +> **get** **is\_upcoming**(): `boolean` + +Defined in: [src/parser/classes/GridVideo.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GridVideo.ts#L64) + +##### Returns + +`boolean` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GridVideo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GridVideo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideCollapsibleEntry.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideCollapsibleEntry.md new file mode 100644 index 00000000..a1836928 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideCollapsibleEntry.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GuideCollapsibleEntry + +# Class: GuideCollapsibleEntry + +Defined in: [src/parser/classes/GuideCollapsibleEntry.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleEntry.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GuideCollapsibleEntry**(`data`): `GuideCollapsibleEntry` + +Defined in: [src/parser/classes/GuideCollapsibleEntry.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleEntry.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GuideCollapsibleEntry` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### collapser\_item + +> **collapser\_item**: [`GuideEntry`](GuideEntry.md) \| `null` + +Defined in: [src/parser/classes/GuideCollapsibleEntry.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleEntry.ts#L10) + +*** + +### expandable\_items + +> **expandable\_items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/GuideCollapsibleEntry.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleEntry.ts#L11) + +*** + +### expander\_item + +> **expander\_item**: [`GuideEntry`](GuideEntry.md) \| `null` + +Defined in: [src/parser/classes/GuideCollapsibleEntry.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleEntry.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GuideCollapsibleEntry'` + +Defined in: [src/parser/classes/GuideCollapsibleEntry.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleEntry.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GuideCollapsibleEntry & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GuideCollapsibleEntry & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideCollapsibleSectionEntry.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideCollapsibleSectionEntry.md new file mode 100644 index 00000000..a953aefb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideCollapsibleSectionEntry.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GuideCollapsibleSectionEntry + +# Class: GuideCollapsibleSectionEntry + +Defined in: [src/parser/classes/GuideCollapsibleSectionEntry.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleSectionEntry.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new GuideCollapsibleSectionEntry**(`data`): `GuideCollapsibleSectionEntry` + +Defined in: [src/parser/classes/GuideCollapsibleSectionEntry.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleSectionEntry.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GuideCollapsibleSectionEntry` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### collapser\_icon + +> **collapser\_icon**: `string` + +Defined in: [src/parser/classes/GuideCollapsibleSectionEntry.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleSectionEntry.ts#L10) + +*** + +### expander\_icon + +> **expander\_icon**: `string` + +Defined in: [src/parser/classes/GuideCollapsibleSectionEntry.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleSectionEntry.ts#L9) + +*** + +### header\_entry + +> **header\_entry**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/GuideCollapsibleSectionEntry.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleSectionEntry.ts#L8) + +*** + +### section\_items + +> **section\_items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/GuideCollapsibleSectionEntry.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleSectionEntry.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GuideCollapsibleSectionEntry'` + +Defined in: [src/parser/classes/GuideCollapsibleSectionEntry.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideCollapsibleSectionEntry.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GuideCollapsibleSectionEntry & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GuideCollapsibleSectionEntry & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideDownloadsEntry.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideDownloadsEntry.md new file mode 100644 index 00000000..32831eff --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideDownloadsEntry.md @@ -0,0 +1,295 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GuideDownloadsEntry + +# Class: GuideDownloadsEntry + +Defined in: [src/parser/classes/GuideDownloadsEntry.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideDownloadsEntry.ts#L4) + +## Extends + +- [`GuideEntry`](GuideEntry.md) + +## Constructors + +### Constructor + +> **new GuideDownloadsEntry**(`data`): `GuideDownloadsEntry` + +Defined in: [src/parser/classes/GuideDownloadsEntry.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideDownloadsEntry.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GuideDownloadsEntry` + +#### Overrides + +[`GuideEntry`](GuideEntry.md).[`constructor`](GuideEntry.md#constructor) + +## Properties + +### always\_show + +> **always\_show**: `boolean` + +Defined in: [src/parser/classes/GuideDownloadsEntry.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideDownloadsEntry.ts#L7) + +*** + +### badges? + +> `optional` **badges**: `any` + +Defined in: [src/parser/classes/GuideEntry.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L14) + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`badges`](GuideEntry.md#badges) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GuideEntry.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L11) + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`endpoint`](GuideEntry.md#endpoint) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/GuideEntry.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L12) + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`icon_type`](GuideEntry.md#icon_type) + +*** + +### is\_primary + +> **is\_primary**: `boolean` + +Defined in: [src/parser/classes/GuideEntry.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L15) + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`is_primary`](GuideEntry.md#is_primary) + +*** + +### thumbnails? + +> `optional` **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/GuideEntry.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L13) + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`thumbnails`](GuideEntry.md#thumbnails) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GuideEntry.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L10) + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`title`](GuideEntry.md#title) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`type`](GuideEntry.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GuideDownloadsEntry'` + +Defined in: [src/parser/classes/GuideDownloadsEntry.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideDownloadsEntry.ts#L5) + +#### Overrides + +[`GuideEntry`](GuideEntry.md).[`type`](GuideEntry.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`as`](GuideEntry.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GuideDownloadsEntry & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GuideDownloadsEntry & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`hasKey`](GuideEntry.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`is`](GuideEntry.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`GuideEntry`](GuideEntry.md).[`key`](GuideEntry.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideEntry.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideEntry.md new file mode 100644 index 00000000..cf6df546 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideEntry.md @@ -0,0 +1,267 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GuideEntry + +# Class: GuideEntry + +Defined in: [src/parser/classes/GuideEntry.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`GuideDownloadsEntry`](GuideDownloadsEntry.md) + +## Constructors + +### Constructor + +> **new GuideEntry**(`data`): `GuideEntry` + +Defined in: [src/parser/classes/GuideEntry.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`GuideEntry` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### badges? + +> `optional` **badges**: `any` + +Defined in: [src/parser/classes/GuideEntry.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/GuideEntry.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L11) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/GuideEntry.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L12) + +*** + +### is\_primary + +> **is\_primary**: `boolean` + +Defined in: [src/parser/classes/GuideEntry.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L15) + +*** + +### thumbnails? + +> `optional` **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/GuideEntry.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/GuideEntry.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'GuideEntry'` + +Defined in: [src/parser/classes/GuideEntry.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideEntry.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is GuideEntry & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is GuideEntry & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/GuideSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideSection.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/GuideSection.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/GuideSection.md index 8b57ca0b..9f6e25f2 100644 --- a/docs/api/namespaces/YTNodes/classes/GuideSection.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideSection.md @@ -1,7 +1,9 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / GuideSection +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GuideSection # Class: GuideSection +Defined in: [src/parser/classes/GuideSection.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSection.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) @@ -12,25 +14,25 @@ ## Constructors -### new GuideSection() +### Constructor -> **new GuideSection**(`data`): [`GuideSection`](GuideSection.md) +> **new GuideSection**(`data`): `GuideSection` + +Defined in: [src/parser/classes/GuideSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSection.ts#L12) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`GuideSection`](GuideSection.md) +`GuideSection` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/GuideSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GuideSection.ts#L12) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -38,9 +40,7 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/GuideSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GuideSection.ts#L10) +Defined in: [src/parser/classes/GuideSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSection.ts#L10) *** @@ -48,9 +48,7 @@ > `optional` **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/GuideSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GuideSection.ts#L9) +Defined in: [src/parser/classes/GuideSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSection.ts#L9) *** @@ -58,45 +56,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'GuideSection'` +Defined in: [src/parser/classes/GuideSection.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSection.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/GuideSection.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GuideSection.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -114,27 +116,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is GuideSection & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -148,27 +154,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -182,27 +192,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -219,7 +233,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/GuideSubscriptionsSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideSubscriptionsSection.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/GuideSubscriptionsSection.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/GuideSubscriptionsSection.md index a4d80537..e09abfb2 100644 --- a/docs/api/namespaces/YTNodes/classes/GuideSubscriptionsSection.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/GuideSubscriptionsSection.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / GuideSubscriptionsSection +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / GuideSubscriptionsSection # Class: GuideSubscriptionsSection +Defined in: [src/parser/classes/GuideSubscriptionsSection.ts:3](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSubscriptionsSection.ts#L3) + ## Extends - [`GuideSection`](GuideSection.md) ## Constructors -### new GuideSubscriptionsSection() +### Constructor -> **new GuideSubscriptionsSection**(`data`): [`GuideSubscriptionsSection`](GuideSubscriptionsSection.md) +> **new GuideSubscriptionsSection**(`data`): `GuideSubscriptionsSection` + +Defined in: [src/parser/classes/GuideSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSection.ts#L12) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`GuideSubscriptionsSection`](GuideSubscriptionsSection.md) +`GuideSubscriptionsSection` #### Inherited from -[`GuideSection`](GuideSection.md).[`constructor`](GuideSection.md#constructors) - -#### Defined in - -[src/parser/classes/GuideSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GuideSection.ts#L12) +[`GuideSection`](GuideSection.md).[`constructor`](GuideSection.md#constructor) ## Properties @@ -34,73 +36,73 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/GuideSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSection.ts#L10) + #### Inherited from [`GuideSection`](GuideSection.md).[`items`](GuideSection.md#items) -#### Defined in - -[src/parser/classes/GuideSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GuideSection.ts#L10) - *** ### title? > `optional` **title**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/GuideSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSection.ts#L9) + #### Inherited from [`GuideSection`](GuideSection.md).[`title`](GuideSection.md#title) -#### Defined in - -[src/parser/classes/GuideSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GuideSection.ts#L9) - *** ### type > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`GuideSection`](GuideSection.md).[`type`](GuideSection.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### type > `static` **type**: `string` = `'GuideSubscriptionsSection'` +Defined in: [src/parser/classes/GuideSubscriptionsSection.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/GuideSubscriptionsSection.ts#L4) + #### Overrides [`GuideSection`](GuideSection.md).[`type`](GuideSection.md#type-1) -#### Defined in - -[src/parser/classes/GuideSubscriptionsSection.ts:4](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/GuideSubscriptionsSection.ts#L4) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -118,27 +120,31 @@ If the node is not of the given type [`GuideSection`](GuideSection.md).[`as`](GuideSection.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is GuideSubscriptionsSection & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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,27 +158,31 @@ Whether the node has the key [`GuideSection`](GuideSection.md).[`hasKey`](GuideSection.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -186,27 +196,31 @@ whether the node is of the given type [`GuideSection`](GuideSection.md).[`is`](GuideSection.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -223,7 +237,3 @@ If the node does not have the key #### Inherited from [`GuideSection`](GuideSection.md).[`key`](GuideSection.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/namespaces/YTNodes/classes/HashtagHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HashtagHeader.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/HashtagHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/HashtagHeader.md index 192ba2be..598442e4 100644 --- a/docs/api/namespaces/YTNodes/classes/HashtagHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HashtagHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / HashtagHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HashtagHeader # Class: HashtagHeader +Defined in: [src/parser/classes/HashtagHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new HashtagHeader() +### Constructor -> **new HashtagHeader**(`data`): [`HashtagHeader`](HashtagHeader.md) +> **new HashtagHeader**(`data`): `HashtagHeader` + +Defined in: [src/parser/classes/HashtagHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagHeader.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`HashtagHeader`](HashtagHeader.md) +`HashtagHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/HashtagHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HashtagHeader.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **hashtag**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/HashtagHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HashtagHeader.ts#L8) +Defined in: [src/parser/classes/HashtagHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagHeader.ts#L8) *** @@ -44,9 +44,7 @@ > **hashtag\_info**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/HashtagHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HashtagHeader.ts#L9) +Defined in: [src/parser/classes/HashtagHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagHeader.ts#L9) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'HashtagHeader'` +Defined in: [src/parser/classes/HashtagHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/HashtagHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HashtagHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is HashtagHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/HashtagTile.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HashtagTile.md new file mode 100644 index 00000000..0dc94373 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HashtagTile.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HashtagTile + +# Class: HashtagTile + +Defined in: [src/parser/classes/HashtagTile.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new HashtagTile**(`data`): `HashtagTile` + +Defined in: [src/parser/classes/HashtagTile.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`HashtagTile` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/HashtagTile.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L13) + +*** + +### hashtag + +> **hashtag**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/HashtagTile.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L10) + +*** + +### hashtag\_background\_color + +> **hashtag\_background\_color**: `number` + +Defined in: [src/parser/classes/HashtagTile.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L14) + +*** + +### hashtag\_channel\_count + +> **hashtag\_channel\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/HashtagTile.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L16) + +*** + +### hashtag\_info\_text + +> **hashtag\_info\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/HashtagTile.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L11) + +*** + +### hashtag\_thumbnail + +> **hashtag\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/HashtagTile.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L12) + +*** + +### hashtag\_video\_count + +> **hashtag\_video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/HashtagTile.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'HashtagTile'` + +Defined in: [src/parser/classes/HashtagTile.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HashtagTile.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is HashtagTile & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is HashtagTile & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/HeatMarker.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HeatMarker.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/HeatMarker.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/HeatMarker.md index 883a46d3..c8e7003a 100644 --- a/docs/api/namespaces/YTNodes/classes/HeatMarker.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HeatMarker.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / HeatMarker +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HeatMarker # Class: HeatMarker +Defined in: [src/parser/classes/HeatMarker.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeatMarker.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new HeatMarker() +### Constructor -> **new HeatMarker**(`data`): [`HeatMarker`](HeatMarker.md) +> **new HeatMarker**(`data`): `HeatMarker` + +Defined in: [src/parser/classes/HeatMarker.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeatMarker.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`HeatMarker`](HeatMarker.md) +`HeatMarker` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/HeatMarker.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HeatMarker.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **heat\_marker\_intensity\_score\_normalized**: `number` -#### Defined in - -[src/parser/classes/HeatMarker.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HeatMarker.ts#L9) +Defined in: [src/parser/classes/HeatMarker.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeatMarker.ts#L9) *** @@ -44,9 +44,7 @@ > **marker\_duration\_millis**: `number` -#### Defined in - -[src/parser/classes/HeatMarker.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HeatMarker.ts#L8) +Defined in: [src/parser/classes/HeatMarker.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeatMarker.ts#L8) *** @@ -54,9 +52,7 @@ > **time\_range\_start\_millis**: `number` -#### Defined in - -[src/parser/classes/HeatMarker.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HeatMarker.ts#L7) +Defined in: [src/parser/classes/HeatMarker.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeatMarker.ts#L7) *** @@ -64,45 +60,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'HeatMarker'` +Defined in: [src/parser/classes/HeatMarker.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeatMarker.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/HeatMarker.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HeatMarker.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -120,27 +120,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is HeatMarker & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -154,27 +158,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -188,27 +196,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -225,7 +237,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/Heatmap.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Heatmap.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/Heatmap.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Heatmap.md index 42753e50..4811c308 100644 --- a/docs/api/namespaces/YTNodes/classes/Heatmap.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Heatmap.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Heatmap +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Heatmap # Class: Heatmap +Defined in: [src/parser/classes/Heatmap.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Heatmap.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Heatmap() +### Constructor -> **new Heatmap**(`data`): [`Heatmap`](Heatmap.md) +> **new Heatmap**(`data`): `Heatmap` + +Defined in: [src/parser/classes/Heatmap.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Heatmap.ts#L15) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Heatmap`](Heatmap.md) +`Heatmap` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Heatmap.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Heatmap.ts#L15) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **heat\_markers**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`HeatMarker`](HeatMarker.md)\> -#### Defined in - -[src/parser/classes/Heatmap.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Heatmap.ts#L12) +Defined in: [src/parser/classes/Heatmap.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Heatmap.ts#L12) *** @@ -44,9 +44,7 @@ > **heat\_markers\_decorations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/Heatmap.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Heatmap.ts#L13) +Defined in: [src/parser/classes/Heatmap.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Heatmap.ts#L13) *** @@ -54,9 +52,7 @@ > **max\_height\_dp**: `number` -#### Defined in - -[src/parser/classes/Heatmap.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Heatmap.ts#L9) +Defined in: [src/parser/classes/Heatmap.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Heatmap.ts#L9) *** @@ -64,9 +60,7 @@ > **min\_height\_dp**: `number` -#### Defined in - -[src/parser/classes/Heatmap.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Heatmap.ts#L10) +Defined in: [src/parser/classes/Heatmap.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Heatmap.ts#L10) *** @@ -74,9 +68,7 @@ > **show\_hide\_animation\_duration\_millis**: `number` -#### Defined in - -[src/parser/classes/Heatmap.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Heatmap.ts#L11) +Defined in: [src/parser/classes/Heatmap.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Heatmap.ts#L11) *** @@ -84,45 +76,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Heatmap'` +Defined in: [src/parser/classes/Heatmap.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Heatmap.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Heatmap.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Heatmap.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -140,27 +136,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Heatmap & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -174,27 +174,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -208,27 +212,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -245,7 +253,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/HeroPlaylistThumbnail.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HeroPlaylistThumbnail.md new file mode 100644 index 00000000..88a2d1c4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HeroPlaylistThumbnail.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HeroPlaylistThumbnail + +# Class: HeroPlaylistThumbnail + +Defined in: [src/parser/classes/HeroPlaylistThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeroPlaylistThumbnail.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new HeroPlaylistThumbnail**(`data`): `HeroPlaylistThumbnail` + +Defined in: [src/parser/classes/HeroPlaylistThumbnail.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeroPlaylistThumbnail.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`HeroPlaylistThumbnail` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### on\_tap\_endpoint + +> **on\_tap\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/HeroPlaylistThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeroPlaylistThumbnail.ts#L10) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/HeroPlaylistThumbnail.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeroPlaylistThumbnail.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'HeroPlaylistThumbnail'` + +Defined in: [src/parser/classes/HeroPlaylistThumbnail.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HeroPlaylistThumbnail.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is HeroPlaylistThumbnail & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is HeroPlaylistThumbnail & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/HideEngagementPanelEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HideEngagementPanelEndpoint.md new file mode 100644 index 00000000..af5679b2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HideEngagementPanelEndpoint.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HideEngagementPanelEndpoint + +# Class: HideEngagementPanelEndpoint + +Defined in: [src/parser/classes/endpoints/HideEngagementPanelEndpoint.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/HideEngagementPanelEndpoint.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new HideEngagementPanelEndpoint**(`data`): `HideEngagementPanelEndpoint` + +Defined in: [src/parser/classes/endpoints/HideEngagementPanelEndpoint.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/HideEngagementPanelEndpoint.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`HideEngagementPanelEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### panel\_identifier + +> **panel\_identifier**: `string` + +Defined in: [src/parser/classes/endpoints/HideEngagementPanelEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/HideEngagementPanelEndpoint.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'HideEngagementPanelEndpoint'` + +Defined in: [src/parser/classes/endpoints/HideEngagementPanelEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/HideEngagementPanelEndpoint.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is HideEngagementPanelEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is HideEngagementPanelEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/HighlightsCarousel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HighlightsCarousel.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/HighlightsCarousel.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/HighlightsCarousel.md index effbee2d..70490962 100644 --- a/docs/api/namespaces/YTNodes/classes/HighlightsCarousel.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HighlightsCarousel.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / HighlightsCarousel +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HighlightsCarousel # Class: HighlightsCarousel +Defined in: [src/parser/classes/HighlightsCarousel.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HighlightsCarousel.ts#L69) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new HighlightsCarousel() +### Constructor -> **new HighlightsCarousel**(`data`): [`HighlightsCarousel`](HighlightsCarousel.md) +> **new HighlightsCarousel**(`data`): `HighlightsCarousel` + +Defined in: [src/parser/classes/HighlightsCarousel.ts:74](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HighlightsCarousel.ts#L74) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`HighlightsCarousel`](HighlightsCarousel.md) +`HighlightsCarousel` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/HighlightsCarousel.ts:74](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HighlightsCarousel.ts#L74) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **panels**: `Panel`[] -#### Defined in - -[src/parser/classes/HighlightsCarousel.ts:72](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HighlightsCarousel.ts#L72) +Defined in: [src/parser/classes/HighlightsCarousel.ts:72](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HighlightsCarousel.ts#L72) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'HighlightsCarousel'` +Defined in: [src/parser/classes/HighlightsCarousel.ts:70](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HighlightsCarousel.ts#L70) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/HighlightsCarousel.ts:70](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HighlightsCarousel.ts#L70) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is HighlightsCarousel & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/HistorySuggestion.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HistorySuggestion.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/HistorySuggestion.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/HistorySuggestion.md index 458b2ba1..03dc8076 100644 --- a/docs/api/namespaces/YTNodes/classes/HistorySuggestion.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HistorySuggestion.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / HistorySuggestion +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HistorySuggestion # Class: HistorySuggestion +Defined in: [src/parser/classes/HistorySuggestion.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HistorySuggestion.ts#L4) + ## Extends - [`SearchSuggestion`](SearchSuggestion.md) ## Constructors -### new HistorySuggestion() +### Constructor -> **new HistorySuggestion**(`data`): [`HistorySuggestion`](HistorySuggestion.md) +> **new HistorySuggestion**(`data`): `HistorySuggestion` + +Defined in: [src/parser/classes/HistorySuggestion.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HistorySuggestion.ts#L7) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`HistorySuggestion`](HistorySuggestion.md) +`HistorySuggestion` #### Overrides -[`SearchSuggestion`](SearchSuggestion.md).[`constructor`](SearchSuggestion.md#constructors) - -#### Defined in - -[src/parser/classes/HistorySuggestion.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HistorySuggestion.ts#L7) +[`SearchSuggestion`](SearchSuggestion.md).[`constructor`](SearchSuggestion.md#constructor) ## Properties @@ -34,101 +36,97 @@ > **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) +Defined in: [src/parser/classes/SearchSuggestion.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L10) + #### Inherited from [`SearchSuggestion`](SearchSuggestion.md).[`endpoint`](SearchSuggestion.md#endpoint) -#### Defined in - -[src/parser/classes/SearchSuggestion.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchSuggestion.ts#L10) - *** ### icon\_type? > `optional` **icon\_type**: `string` +Defined in: [src/parser/classes/SearchSuggestion.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L11) + #### Inherited from [`SearchSuggestion`](SearchSuggestion.md).[`icon_type`](SearchSuggestion.md#icon_type) -#### Defined in - -[src/parser/classes/SearchSuggestion.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchSuggestion.ts#L11) - *** ### service\_endpoint? > `optional` **service\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) +Defined in: [src/parser/classes/SearchSuggestion.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L12) + #### Inherited from [`SearchSuggestion`](SearchSuggestion.md).[`service_endpoint`](SearchSuggestion.md#service_endpoint) -#### Defined in - -[src/parser/classes/SearchSuggestion.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchSuggestion.ts#L12) - *** ### suggestion > **suggestion**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/SearchSuggestion.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L9) + #### Inherited from [`SearchSuggestion`](SearchSuggestion.md).[`suggestion`](SearchSuggestion.md#suggestion) -#### Defined in - -[src/parser/classes/SearchSuggestion.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchSuggestion.ts#L9) - *** ### type > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`SearchSuggestion`](SearchSuggestion.md).[`type`](SearchSuggestion.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### type > `static` **type**: `string` = `'HistorySuggestion'` +Defined in: [src/parser/classes/HistorySuggestion.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HistorySuggestion.ts#L5) + #### Overrides [`SearchSuggestion`](SearchSuggestion.md).[`type`](SearchSuggestion.md#type-1) -#### Defined in - -[src/parser/classes/HistorySuggestion.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HistorySuggestion.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -146,27 +144,31 @@ If the node is not of the given type [`SearchSuggestion`](SearchSuggestion.md).[`as`](SearchSuggestion.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is HistorySuggestion & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -180,27 +182,31 @@ Whether the node has the key [`SearchSuggestion`](SearchSuggestion.md).[`hasKey`](SearchSuggestion.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -214,27 +220,31 @@ whether the node is of the given type [`SearchSuggestion`](SearchSuggestion.md).[`is`](SearchSuggestion.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -251,7 +261,3 @@ If the node does not have the key #### Inherited from [`SearchSuggestion`](SearchSuggestion.md).[`key`](SearchSuggestion.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalCardList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalCardList.md new file mode 100644 index 00000000..29994479 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalCardList.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HorizontalCardList + +# Class: HorizontalCardList + +Defined in: [src/parser/classes/HorizontalCardList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalCardList.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new HorizontalCardList**(`data`): `HorizontalCardList` + +Defined in: [src/parser/classes/HorizontalCardList.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalCardList.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`HorizontalCardList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### cards + +> **cards**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SearchRefinementCard`](SearchRefinementCard.md) \| [`MacroMarkersListItem`](MacroMarkersListItem.md) \| [`GameCard`](GameCard.md) \| [`VideoCard`](VideoCard.md) \| [`VideoAttributeView`](VideoAttributeView.md)\> + +Defined in: [src/parser/classes/HorizontalCardList.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalCardList.ts#L13) + +*** + +### header + +> **header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/HorizontalCardList.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalCardList.ts#L14) + +*** + +### next\_button + +> **next\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/HorizontalCardList.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalCardList.ts#L16) + +*** + +### previous\_button + +> **previous\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/HorizontalCardList.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalCardList.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'HorizontalCardList'` + +Defined in: [src/parser/classes/HorizontalCardList.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalCardList.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is HorizontalCardList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is HorizontalCardList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalList.md new file mode 100644 index 00000000..5af99552 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalList.md @@ -0,0 +1,245 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HorizontalList + +# Class: HorizontalList + +Defined in: [src/parser/classes/HorizontalList.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalList.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new HorizontalList**(`data`): `HorizontalList` + +Defined in: [src/parser/classes/HorizontalList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalList.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`HorizontalList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/HorizontalList.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalList.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### visible\_item\_count + +> **visible\_item\_count**: `string` + +Defined in: [src/parser/classes/HorizontalList.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalList.ts#L7) + +*** + +### type + +> `static` **type**: `string` = `'HorizontalList'` + +Defined in: [src/parser/classes/HorizontalList.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalList.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/HorizontalList.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalList.ts#L17) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is HorizontalList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is HorizontalList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalMovieList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalMovieList.md new file mode 100644 index 00000000..7b907ec9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HorizontalMovieList.md @@ -0,0 +1,253 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HorizontalMovieList + +# Class: HorizontalMovieList + +Defined in: [src/parser/classes/HorizontalMovieList.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalMovieList.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new HorizontalMovieList**(`data`): `HorizontalMovieList` + +Defined in: [src/parser/classes/HorizontalMovieList.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalMovieList.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`HorizontalMovieList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/HorizontalMovieList.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalMovieList.ts#L8) + +*** + +### next\_button + +> **next\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/HorizontalMovieList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalMovieList.ts#L10) + +*** + +### previous\_button + +> **previous\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/HorizontalMovieList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalMovieList.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'HorizontalMovieList'` + +Defined in: [src/parser/classes/HorizontalMovieList.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalMovieList.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/HorizontalMovieList.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HorizontalMovieList.ts#L20) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is HorizontalMovieList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is HorizontalMovieList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/HowThisWasMadeSectionView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HowThisWasMadeSectionView.md new file mode 100644 index 00000000..f25360e0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HowThisWasMadeSectionView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HowThisWasMadeSectionView + +# Class: HowThisWasMadeSectionView + +Defined in: [src/parser/classes/HowThisWasMadeSectionView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HowThisWasMadeSectionView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new HowThisWasMadeSectionView**(`data`): `HowThisWasMadeSectionView` + +Defined in: [src/parser/classes/HowThisWasMadeSectionView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HowThisWasMadeSectionView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`HowThisWasMadeSectionView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### body\_header? + +> `optional` **body\_header**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/HowThisWasMadeSectionView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HowThisWasMadeSectionView.ts#L10) + +*** + +### body\_text? + +> `optional` **body\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/HowThisWasMadeSectionView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HowThisWasMadeSectionView.ts#L9) + +*** + +### section\_title? + +> `optional` **section\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/HowThisWasMadeSectionView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HowThisWasMadeSectionView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'HowThisWasMadeSectionView'` + +Defined in: [src/parser/classes/HowThisWasMadeSectionView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HowThisWasMadeSectionView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is HowThisWasMadeSectionView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is HowThisWasMadeSectionView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/HypePointsFactoid.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/HypePointsFactoid.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/HypePointsFactoid.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/HypePointsFactoid.md index 9d47d364..ca0c78d9 100644 --- a/docs/api/namespaces/YTNodes/classes/HypePointsFactoid.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/HypePointsFactoid.md @@ -1,42 +1,42 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / HypePointsFactoid +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / HypePointsFactoid # Class: HypePointsFactoid +Defined in: [src/parser/classes/HypePointsFactoid.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HypePointsFactoid.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new HypePointsFactoid() +### Constructor -> **new HypePointsFactoid**(`data`): [`HypePointsFactoid`](HypePointsFactoid.md) +> **new HypePointsFactoid**(`data`): `HypePointsFactoid` + +Defined in: [src/parser/classes/HypePointsFactoid.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HypePointsFactoid.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`HypePointsFactoid`](HypePointsFactoid.md) +`HypePointsFactoid` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/HypePointsFactoid.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HypePointsFactoid.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties ### factoid -> **factoid**: `null` \| [`Factoid`](Factoid.md) +> **factoid**: [`Factoid`](Factoid.md) \| `null` -#### Defined in - -[src/parser/classes/HypePointsFactoid.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HypePointsFactoid.ts#L8) +Defined in: [src/parser/classes/HypePointsFactoid.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HypePointsFactoid.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'HypePointsFactoid'` +Defined in: [src/parser/classes/HypePointsFactoid.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/HypePointsFactoid.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/HypePointsFactoid.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/HypePointsFactoid.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is HypePointsFactoid & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/IconLink.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/IconLink.md new file mode 100644 index 00000000..64477826 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/IconLink.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / IconLink + +# Class: IconLink + +Defined in: [src/parser/classes/IconLink.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IconLink.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new IconLink**(`data`): `IconLink` + +Defined in: [src/parser/classes/IconLink.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IconLink.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`IconLink` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/IconLink.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IconLink.ts#L11) + +*** + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/IconLink.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IconLink.ts#L9) + +*** + +### tooltip? + +> `optional` **tooltip**: `string` + +Defined in: [src/parser/classes/IconLink.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IconLink.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'IconLink'` + +Defined in: [src/parser/classes/IconLink.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IconLink.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is IconLink & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is IconLink & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ImageBannerView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ImageBannerView.md new file mode 100644 index 00000000..094232d7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ImageBannerView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ImageBannerView + +# Class: ImageBannerView + +Defined in: [src/parser/classes/ImageBannerView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ImageBannerView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ImageBannerView**(`data`): `ImageBannerView` + +Defined in: [src/parser/classes/ImageBannerView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ImageBannerView.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ImageBannerView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### image + +> **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ImageBannerView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ImageBannerView.ts#L8) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/ImageBannerView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ImageBannerView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ImageBannerView'` + +Defined in: [src/parser/classes/ImageBannerView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ImageBannerView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ImageBannerView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ImageBannerView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/IncludingResultsFor.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/IncludingResultsFor.md new file mode 100644 index 00000000..f80db7f8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/IncludingResultsFor.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / IncludingResultsFor + +# Class: IncludingResultsFor + +Defined in: [src/parser/classes/IncludingResultsFor.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new IncludingResultsFor**(`data`): `IncludingResultsFor` + +Defined in: [src/parser/classes/IncludingResultsFor.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`IncludingResultsFor` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### corrected\_query + +> **corrected\_query**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/IncludingResultsFor.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L10) + +*** + +### corrected\_query\_endpoint + +> **corrected\_query\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/IncludingResultsFor.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L11) + +*** + +### including\_results\_for + +> **including\_results\_for**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/IncludingResultsFor.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L9) + +*** + +### original\_query? + +> `optional` **original\_query**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/IncludingResultsFor.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L13) + +*** + +### original\_query\_endpoint? + +> `optional` **original\_query\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/IncludingResultsFor.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L14) + +*** + +### search\_only\_for? + +> `optional` **search\_only\_for**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/IncludingResultsFor.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'IncludingResultsFor'` + +Defined in: [src/parser/classes/IncludingResultsFor.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/IncludingResultsFor.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is IncludingResultsFor & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is IncludingResultsFor & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/InfoPanelContainer.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/InfoPanelContainer.md new file mode 100644 index 00000000..547cee52 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/InfoPanelContainer.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / InfoPanelContainer + +# Class: InfoPanelContainer + +Defined in: [src/parser/classes/InfoPanelContainer.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new InfoPanelContainer**(`data`): `InfoPanelContainer` + +Defined in: [src/parser/classes/InfoPanelContainer.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L19) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`InfoPanelContainer` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### background + +> **background**: `string` + +Defined in: [src/parser/classes/InfoPanelContainer.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L15) + +*** + +### content + +> **content**: [`InfoPanelContent`](InfoPanelContent.md) \| `null` + +Defined in: [src/parser/classes/InfoPanelContainer.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L13) + +*** + +### header\_endpoint? + +> `optional` **header\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/InfoPanelContainer.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L14) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/InfoPanelContainer.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L17) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/InfoPanelContainer.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/InfoPanelContainer.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L11) + +*** + +### title\_style? + +> `optional` **title\_style**: `string` + +Defined in: [src/parser/classes/InfoPanelContainer.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'InfoPanelContainer'` + +Defined in: [src/parser/classes/InfoPanelContainer.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContainer.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is InfoPanelContainer & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is InfoPanelContainer & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/InfoPanelContent.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/InfoPanelContent.md new file mode 100644 index 00000000..163bf463 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/InfoPanelContent.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / InfoPanelContent + +# Class: InfoPanelContent + +Defined in: [src/parser/classes/InfoPanelContent.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new InfoPanelContent**(`data`): `InfoPanelContent` + +Defined in: [src/parser/classes/InfoPanelContent.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`InfoPanelContent` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### attributed\_paragraphs? + +> `optional` **attributed\_paragraphs**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/InfoPanelContent.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L14) + +*** + +### background + +> **background**: `string` + +Defined in: [src/parser/classes/InfoPanelContent.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L18) + +*** + +### inline\_link\_icon\_type? + +> `optional` **inline\_link\_icon\_type**: `string` + +Defined in: [src/parser/classes/InfoPanelContent.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L19) + +*** + +### paragraphs? + +> `optional` **paragraphs**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/InfoPanelContent.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L13) + +*** + +### source + +> **source**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/InfoPanelContent.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L12) + +*** + +### source\_endpoint + +> **source\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/InfoPanelContent.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L16) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/InfoPanelContent.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L15) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/InfoPanelContent.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L11) + +*** + +### truncate\_paragraphs + +> **truncate\_paragraphs**: `boolean` + +Defined in: [src/parser/classes/InfoPanelContent.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L17) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'InfoPanelContent'` + +Defined in: [src/parser/classes/InfoPanelContent.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoPanelContent.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is InfoPanelContent & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is InfoPanelContent & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/InfoRow.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/InfoRow.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/InfoRow.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/InfoRow.md index c1f36794..a265b7c4 100644 --- a/docs/api/namespaces/YTNodes/classes/InfoRow.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/InfoRow.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / InfoRow +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / InfoRow # Class: InfoRow +Defined in: [src/parser/classes/InfoRow.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoRow.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new InfoRow() +### Constructor -> **new InfoRow**(`data`): [`InfoRow`](InfoRow.md) +> **new InfoRow**(`data`): `InfoRow` + +Defined in: [src/parser/classes/InfoRow.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoRow.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`InfoRow`](InfoRow.md) +`InfoRow` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/InfoRow.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/InfoRow.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > `optional` **default\_metadata**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/InfoRow.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/InfoRow.ts#L9) +Defined in: [src/parser/classes/InfoRow.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoRow.ts#L9) *** @@ -44,9 +44,7 @@ > `optional` **expanded\_metadata**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/InfoRow.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/InfoRow.ts#L10) +Defined in: [src/parser/classes/InfoRow.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoRow.ts#L10) *** @@ -54,9 +52,7 @@ > `optional` **info\_row\_expand\_status\_key**: `string` -#### Defined in - -[src/parser/classes/InfoRow.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/InfoRow.ts#L11) +Defined in: [src/parser/classes/InfoRow.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoRow.ts#L11) *** @@ -64,9 +60,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/InfoRow.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/InfoRow.ts#L8) +Defined in: [src/parser/classes/InfoRow.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoRow.ts#L8) *** @@ -74,45 +68,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'InfoRow'` +Defined in: [src/parser/classes/InfoRow.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InfoRow.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/InfoRow.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/InfoRow.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -130,27 +128,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is InfoRow & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -164,27 +166,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -198,27 +204,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -235,7 +245,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/InteractiveTabbedHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/InteractiveTabbedHeader.md new file mode 100644 index 00000000..a8b67584 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/InteractiveTabbedHeader.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / InteractiveTabbedHeader + +# Class: InteractiveTabbedHeader + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new InteractiveTabbedHeader**(`data`): `InteractiveTabbedHeader` + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`InteractiveTabbedHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### auto\_generated + +> **auto\_generated**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L21) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MetadataBadge`](MetadataBadge.md)\> + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L17) + +*** + +### banner + +> **banner**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L19) + +*** + +### box\_art + +> **box\_art**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L18) + +*** + +### buttons + +> **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md) \| [`SubscribeButton`](SubscribeButton.md)\> + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L20) + +*** + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L15) + +*** + +### header\_type + +> **header\_type**: `string` + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L13) + +*** + +### metadata + +> **metadata**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L16) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'InteractiveTabbedHeader'` + +Defined in: [src/parser/classes/InteractiveTabbedHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/InteractiveTabbedHeader.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is InteractiveTabbedHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is InteractiveTabbedHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSection.md new file mode 100644 index 00000000..d506f8e3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSection.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ItemSection + +# Class: ItemSection + +Defined in: [src/parser/classes/ItemSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSection.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ItemSection**(`data`): `ItemSection` + +Defined in: [src/parser/classes/ItemSection.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSection.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ItemSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ItemSection.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSection.ts#L13) + +*** + +### continuation? + +> `optional` **continuation**: `string` + +Defined in: [src/parser/classes/ItemSection.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSection.ts#L15) + +*** + +### header + +> **header**: [`ItemSectionHeader`](ItemSectionHeader.md) \| [`ItemSectionTabbedHeader`](ItemSectionTabbedHeader.md) \| [`CommentsHeader`](CommentsHeader.md) \| [`SortFilterHeader`](SortFilterHeader.md) \| [`FeedFilterChipBar`](FeedFilterChipBar.md) \| `null` + +Defined in: [src/parser/classes/ItemSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSection.ts#L12) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/ItemSection.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSection.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ItemSection'` + +Defined in: [src/parser/classes/ItemSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSection.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ItemSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ItemSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ItemSectionHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionHeader.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/ItemSectionHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionHeader.md index 6d983b3b..b5c03459 100644 --- a/docs/api/namespaces/YTNodes/classes/ItemSectionHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ItemSectionHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ItemSectionHeader # Class: ItemSectionHeader +Defined in: [src/parser/classes/ItemSectionHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ItemSectionHeader() +### Constructor -> **new ItemSectionHeader**(`data`): [`ItemSectionHeader`](ItemSectionHeader.md) +> **new ItemSectionHeader**(`data`): `ItemSectionHeader` + +Defined in: [src/parser/classes/ItemSectionHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionHeader.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ItemSectionHeader`](ItemSectionHeader.md) +`ItemSectionHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ItemSectionHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ItemSectionHeader.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/ItemSectionHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ItemSectionHeader.ts#L8) +Defined in: [src/parser/classes/ItemSectionHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionHeader.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ItemSectionHeader'` +Defined in: [src/parser/classes/ItemSectionHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ItemSectionHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ItemSectionHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ItemSectionHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionTab.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionTab.md new file mode 100644 index 00000000..1e20fc11 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionTab.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ItemSectionTab + +# Class: ItemSectionTab + +Defined in: [src/parser/classes/ItemSectionTab.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTab.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ItemSectionTab**(`data`): `ItemSectionTab` + +Defined in: [src/parser/classes/ItemSectionTab.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTab.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ItemSectionTab` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ItemSectionTab.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTab.ts#L11) + +*** + +### selected + +> **selected**: `boolean` + +Defined in: [src/parser/classes/ItemSectionTab.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTab.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ItemSectionTab.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTab.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Tab'` + +Defined in: [src/parser/classes/ItemSectionTab.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTab.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ItemSectionTab & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ItemSectionTab & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionTabbedHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionTabbedHeader.md new file mode 100644 index 00000000..a03cd0d3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ItemSectionTabbedHeader.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ItemSectionTabbedHeader + +# Class: ItemSectionTabbedHeader + +Defined in: [src/parser/classes/ItemSectionTabbedHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTabbedHeader.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ItemSectionTabbedHeader**(`data`): `ItemSectionTabbedHeader` + +Defined in: [src/parser/classes/ItemSectionTabbedHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTabbedHeader.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ItemSectionTabbedHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### end\_items? + +> `optional` **end\_items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ItemSectionTabbedHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTabbedHeader.ts#L11) + +*** + +### tabs + +> **tabs**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ItemSectionTab`](ItemSectionTab.md)\> + +Defined in: [src/parser/classes/ItemSectionTabbedHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTabbedHeader.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ItemSectionTabbedHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTabbedHeader.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ItemSectionTabbedHeader'` + +Defined in: [src/parser/classes/ItemSectionTabbedHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ItemSectionTabbedHeader.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ItemSectionTabbedHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ItemSectionTabbedHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsBlocklistPicker.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsBlocklistPicker.md new file mode 100644 index 00000000..78982dc2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsBlocklistPicker.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / KidsBlocklistPicker + +# Class: KidsBlocklistPicker + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPicker.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPicker.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new KidsBlocklistPicker**(`data`): `KidsBlocklistPicker` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPicker.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPicker.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`KidsBlocklistPicker` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### child\_rows + +> **child\_rows**: [`KidsBlocklistPickerItem`](KidsBlocklistPickerItem.md)[] \| `null` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPicker.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPicker.ts#L11) + +*** + +### done\_button + +> **done\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPicker.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPicker.ts#L12) + +*** + +### successful\_toast\_action\_message + +> **successful\_toast\_action\_message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPicker.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPicker.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPicker.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPicker.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'KidsBlocklistPicker'` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPicker.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPicker.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is KidsBlocklistPicker & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is KidsBlocklistPicker & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsBlocklistPickerItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsBlocklistPickerItem.md new file mode 100644 index 00000000..2fd47573 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsBlocklistPickerItem.md @@ -0,0 +1,285 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / KidsBlocklistPickerItem + +# Class: KidsBlocklistPickerItem + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new KidsBlocklistPickerItem**(`data`): `KidsBlocklistPickerItem` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`KidsBlocklistPickerItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### avatar + +> **avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L17) + +*** + +### block\_button + +> **block\_button**: [`ToggleButton`](ToggleButton.md) \| `null` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L18) + +*** + +### blocked\_entity\_key + +> **blocked\_entity\_key**: `string` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L19) + +*** + +### child\_account\_description + +> **child\_account\_description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L16) + +*** + +### child\_display\_name + +> **child\_display\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'KidsBlocklistPickerItem'` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### blockChannel() + +> **blockChannel**(): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L30) + +#### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is KidsBlocklistPickerItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is KidsBlocklistPickerItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) + +*** + +### setActions() + +> **setActions**(`actions`): `void` + +Defined in: [src/parser/classes/ytkids/KidsBlocklistPickerItem.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsBlocklistPickerItem.ts#L46) + +#### Parameters + +##### actions + +[`Actions`](../../../../classes/Actions.md) | `undefined` + +#### Returns + +`void` diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsCategoriesHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsCategoriesHeader.md new file mode 100644 index 00000000..9f025f7b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsCategoriesHeader.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / KidsCategoriesHeader + +# Class: KidsCategoriesHeader + +Defined in: [src/parser/classes/ytkids/KidsCategoriesHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoriesHeader.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new KidsCategoriesHeader**(`data`): `KidsCategoriesHeader` + +Defined in: [src/parser/classes/ytkids/KidsCategoriesHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoriesHeader.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`KidsCategoriesHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### category\_tabs + +> **category\_tabs**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`KidsCategoryTab`](KidsCategoryTab.md)\> + +Defined in: [src/parser/classes/ytkids/KidsCategoriesHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoriesHeader.ts#L10) + +*** + +### privacy\_button + +> **privacy\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ytkids/KidsCategoriesHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoriesHeader.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'kidsCategoriesHeader'` + +Defined in: [src/parser/classes/ytkids/KidsCategoriesHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoriesHeader.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is KidsCategoriesHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is KidsCategoriesHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsCategoryTab.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsCategoryTab.md new file mode 100644 index 00000000..09a680d0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsCategoryTab.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / KidsCategoryTab + +# Class: KidsCategoryTab + +Defined in: [src/parser/classes/ytkids/KidsCategoryTab.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoryTab.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new KidsCategoryTab**(`data`): `KidsCategoryTab` + +Defined in: [src/parser/classes/ytkids/KidsCategoryTab.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoryTab.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`KidsCategoryTab` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### category\_assets + +> **category\_assets**: `object` + +Defined in: [src/parser/classes/ytkids/KidsCategoryTab.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoryTab.ts#L10) + +#### asset\_key + +> **asset\_key**: `string` + +#### background\_color + +> **background\_color**: `string` + +*** + +### category\_type + +> **category\_type**: `string` + +Defined in: [src/parser/classes/ytkids/KidsCategoryTab.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoryTab.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ytkids/KidsCategoryTab.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoryTab.ts#L15) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ytkids/KidsCategoryTab.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoryTab.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'KidsCategoryTab'` + +Defined in: [src/parser/classes/ytkids/KidsCategoryTab.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsCategoryTab.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is KidsCategoryTab & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is KidsCategoryTab & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/KidsHomeScreen.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsHomeScreen.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/KidsHomeScreen.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/KidsHomeScreen.md index 18c0a42b..222ee366 100644 --- a/docs/api/namespaces/YTNodes/classes/KidsHomeScreen.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/KidsHomeScreen.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / KidsHomeScreen +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / KidsHomeScreen # Class: KidsHomeScreen +Defined in: [src/parser/classes/ytkids/KidsHomeScreen.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsHomeScreen.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new KidsHomeScreen() +### Constructor -> **new KidsHomeScreen**(`data`): [`KidsHomeScreen`](KidsHomeScreen.md) +> **new KidsHomeScreen**(`data`): `KidsHomeScreen` + +Defined in: [src/parser/classes/ytkids/KidsHomeScreen.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsHomeScreen.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`KidsHomeScreen`](KidsHomeScreen.md) +`KidsHomeScreen` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ytkids/KidsHomeScreen.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ytkids/KidsHomeScreen.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **anchors**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`AnchoredSection`](AnchoredSection.md)\> -#### Defined in - -[src/parser/classes/ytkids/KidsHomeScreen.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ytkids/KidsHomeScreen.ts#L9) +Defined in: [src/parser/classes/ytkids/KidsHomeScreen.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsHomeScreen.ts#L9) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'kidsHomeScreen'` +Defined in: [src/parser/classes/ytkids/KidsHomeScreen.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ytkids/KidsHomeScreen.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ytkids/KidsHomeScreen.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ytkids/KidsHomeScreen.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is KidsHomeScreen & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeButton.md new file mode 100644 index 00000000..1eb1c6ef --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeButton.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LikeButton + +# Class: LikeButton + +Defined in: [src/parser/classes/LikeButton.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButton.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LikeButton**(`data`): `LikeButton` + +Defined in: [src/parser/classes/LikeButton.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButton.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LikeButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoints? + +> `optional` **endpoints**: [`NavigationEndpoint`](NavigationEndpoint.md)[] + +Defined in: [src/parser/classes/LikeButton.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButton.ts#L14) + +*** + +### like\_status + +> **like\_status**: `string` + +Defined in: [src/parser/classes/LikeButton.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButton.ts#L12) + +*** + +### likes\_allowed + +> **likes\_allowed**: `string` + +Defined in: [src/parser/classes/LikeButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButton.ts#L13) + +*** + +### target + +> **target**: `object` + +Defined in: [src/parser/classes/LikeButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButton.ts#L8) + +#### video\_id + +> **video\_id**: `string` + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LikeButton'` + +Defined in: [src/parser/classes/LikeButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButton.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LikeButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LikeButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeButtonView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeButtonView.md new file mode 100644 index 00000000..428e0c73 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeButtonView.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LikeButtonView + +# Class: LikeButtonView + +Defined in: [src/parser/classes/LikeButtonView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButtonView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LikeButtonView**(`data`): `LikeButtonView` + +Defined in: [src/parser/classes/LikeButtonView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButtonView.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LikeButtonView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### like\_status\_entity + +> **like\_status\_entity**: `object` + +Defined in: [src/parser/classes/LikeButtonView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButtonView.ts#L10) + +#### key + +> **key**: `string` + +#### like\_status + +> **like\_status**: `string` + +*** + +### like\_status\_entity\_key + +> **like\_status\_entity\_key**: `string` + +Defined in: [src/parser/classes/LikeButtonView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButtonView.ts#L9) + +*** + +### toggle\_button + +> **toggle\_button**: [`ToggleButtonView`](ToggleButtonView.md) \| `null` + +Defined in: [src/parser/classes/LikeButtonView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButtonView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LikeButtonView'` + +Defined in: [src/parser/classes/LikeButtonView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LikeButtonView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LikeButtonView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LikeButtonView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeEndpoint.md new file mode 100644 index 00000000..39db3b41 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LikeEndpoint.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LikeEndpoint + +# Class: LikeEndpoint + +Defined in: [src/parser/classes/endpoints/LikeEndpoint.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LikeEndpoint.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`LikeRequest`](../../../../type-aliases/LikeRequest.md)\> + +## Constructors + +### Constructor + +> **new LikeEndpoint**(`data`): `LikeEndpoint` + +Defined in: [src/parser/classes/endpoints/LikeEndpoint.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LikeEndpoint.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LikeEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LikeEndpoint'` + +Defined in: [src/parser/classes/endpoints/LikeEndpoint.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LikeEndpoint.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`LikeRequest`](../../../../type-aliases/LikeRequest.md) + +Defined in: [src/parser/classes/endpoints/LikeEndpoint.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LikeEndpoint.ts#L24) + +#### Returns + +[`LikeRequest`](../../../../type-aliases/LikeRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/LikeEndpoint.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LikeEndpoint.ts#L18) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### getParams() + +> **getParams**(): `string` \| `undefined` + +Defined in: [src/parser/classes/endpoints/LikeEndpoint.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LikeEndpoint.ts#L37) + +#### Returns + +`string` \| `undefined` + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LikeEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LikeEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ListItemView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ListItemView.md new file mode 100644 index 00000000..37b2bac8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ListItemView.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ListItemView + +# Class: ListItemView + +Defined in: [src/parser/classes/ListItemView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListItemView.ts#L11) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ListItemView**(`data`): `ListItemView` + +Defined in: [src/parser/classes/ListItemView.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListItemView.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ListItemView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### leading\_accessory + +> **leading\_accessory**: [`AvatarView`](AvatarView.md) \| `null` + +Defined in: [src/parser/classes/ListItemView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListItemView.ts#L16) + +*** + +### renderer\_context + +> **renderer\_context**: [`RendererContext`](../../Misc/classes/RendererContext.md) + +Defined in: [src/parser/classes/ListItemView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListItemView.ts#L17) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ListItemView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListItemView.ts#L15) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ListItemView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListItemView.ts#L14) + +*** + +### trailing\_buttons? + +> `optional` **trailing\_buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SubscribeButtonView`](SubscribeButtonView.md)\> + +Defined in: [src/parser/classes/ListItemView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListItemView.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ListItemView'` + +Defined in: [src/parser/classes/ListItemView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListItemView.ts#L12) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ListItemView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ListItemView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ListView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ListView.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/ListView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ListView.md index ee3d650a..030f4237 100644 --- a/docs/api/namespaces/YTNodes/classes/ListView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ListView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ListView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ListView # Class: ListView +Defined in: [src/parser/classes/ListView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListView.ts#L8) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ListView() +### Constructor -> **new ListView**(`data`): [`ListView`](ListView.md) +> **new ListView**(`data`): `ListView` + +Defined in: [src/parser/classes/ListView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListView.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ListView`](ListView.md) +`ListView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ListView.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ListView.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ListItemView`](ListItemView.md)\> -#### Defined in - -[src/parser/classes/ListView.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ListView.ts#L11) +Defined in: [src/parser/classes/ListView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListView.ts#L11) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ListView'` +Defined in: [src/parser/classes/ListView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ListView.ts#L9) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ListView.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ListView.ts#L9) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ListView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/LiveChat.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChat.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/LiveChat.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChat.md index 2e503066..5f8afbfa 100644 --- a/docs/api/namespaces/YTNodes/classes/LiveChat.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChat.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / LiveChat +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChat # Class: LiveChat +Defined in: [src/parser/classes/LiveChat.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChat.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new LiveChat() +### Constructor -> **new LiveChat**(`data`): [`LiveChat`](LiveChat.md) +> **new LiveChat**(`data`): `LiveChat` + +Defined in: [src/parser/classes/LiveChat.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChat.ts#L22) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`LiveChat`](LiveChat.md) +`LiveChat` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/LiveChat.ts:22](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChat.ts#L22) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,6 +36,8 @@ > **client\_messages**: `object` +Defined in: [src/parser/classes/LiveChat.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChat.ts#L12) + #### fatal\_error > **fatal\_error**: [`Text`](../../Misc/classes/Text.md) @@ -54,19 +58,13 @@ > **unable\_to\_reconnect\_message**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/LiveChat.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChat.ts#L12) - *** ### continuation > **continuation**: `string` -#### Defined in - -[src/parser/classes/LiveChat.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChat.ts#L10) +Defined in: [src/parser/classes/LiveChat.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChat.ts#L10) *** @@ -74,9 +72,7 @@ > **header**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/LiveChat.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChat.ts#L8) +Defined in: [src/parser/classes/LiveChat.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChat.ts#L8) *** @@ -84,9 +80,7 @@ > **initial\_display\_state**: `string` -#### Defined in - -[src/parser/classes/LiveChat.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChat.ts#L9) +Defined in: [src/parser/classes/LiveChat.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChat.ts#L9) *** @@ -94,9 +88,7 @@ > **is\_replay**: `boolean` -#### Defined in - -[src/parser/classes/LiveChat.ts:20](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChat.ts#L20) +Defined in: [src/parser/classes/LiveChat.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChat.ts#L20) *** @@ -104,45 +96,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'LiveChat'` +Defined in: [src/parser/classes/LiveChat.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChat.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/LiveChat.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChat.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -160,27 +156,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is LiveChat & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -194,27 +194,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -228,27 +232,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -265,7 +273,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatActionPanel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatActionPanel.md new file mode 100644 index 00000000..df0447aa --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatActionPanel.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatActionPanel + +# Class: LiveChatActionPanel + +Defined in: [src/parser/classes/livechat/LiveChatActionPanel.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/LiveChatActionPanel.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatActionPanel**(`data`): `LiveChatActionPanel` + +Defined in: [src/parser/classes/livechat/LiveChatActionPanel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/LiveChatActionPanel.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatActionPanel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/livechat/LiveChatActionPanel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/LiveChatActionPanel.ts#L9) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/LiveChatActionPanel.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/LiveChatActionPanel.ts#L8) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/livechat/LiveChatActionPanel.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/LiveChatActionPanel.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatActionPanel'` + +Defined in: [src/parser/classes/livechat/LiveChatActionPanel.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/LiveChatActionPanel.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatActionPanel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatActionPanel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatAuthorBadge.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatAuthorBadge.md new file mode 100644 index 00000000..807aa680 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatAuthorBadge.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatAuthorBadge + +# Class: LiveChatAuthorBadge + +Defined in: [src/parser/classes/LiveChatAuthorBadge.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatAuthorBadge.ts#L5) + +## Extends + +- [`MetadataBadge`](MetadataBadge.md) + +## Constructors + +### Constructor + +> **new LiveChatAuthorBadge**(`data`): `LiveChatAuthorBadge` + +Defined in: [src/parser/classes/LiveChatAuthorBadge.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatAuthorBadge.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatAuthorBadge` + +#### Overrides + +[`MetadataBadge`](MetadataBadge.md).[`constructor`](MetadataBadge.md#constructor) + +## Properties + +### custom\_thumbnail + +> **custom\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/LiveChatAuthorBadge.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatAuthorBadge.ts#L8) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/MetadataBadge.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L7) + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`icon_type`](MetadataBadge.md#icon_type) + +*** + +### label? + +> `optional` **label**: `string` + +Defined in: [src/parser/classes/MetadataBadge.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L9) + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`label`](MetadataBadge.md#label) + +*** + +### style? + +> `optional` **style**: `string` + +Defined in: [src/parser/classes/MetadataBadge.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L8) + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`style`](MetadataBadge.md#style) + +*** + +### tooltip? + +> `optional` **tooltip**: `string` + +Defined in: [src/parser/classes/MetadataBadge.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L10) + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`tooltip`](MetadataBadge.md#tooltip) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`type`](MetadataBadge.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatAuthorBadge'` + +Defined in: [src/parser/classes/LiveChatAuthorBadge.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatAuthorBadge.ts#L6) + +#### Overrides + +[`MetadataBadge`](MetadataBadge.md).[`type`](MetadataBadge.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`as`](MetadataBadge.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatAuthorBadge & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatAuthorBadge & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`hasKey`](MetadataBadge.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`is`](MetadataBadge.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`MetadataBadge`](MetadataBadge.md).[`key`](MetadataBadge.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatAutoModMessage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatAutoModMessage.md new file mode 100644 index 00000000..a3d257d5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatAutoModMessage.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatAutoModMessage + +# Class: LiveChatAutoModMessage + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatAutoModMessage**(`data`): `LiveChatAutoModMessage` + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L19) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatAutoModMessage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### auto\_moderated\_item + +> **auto\_moderated\_item**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L14) + +*** + +### header\_text + +> **header\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L15) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L17) + +*** + +### menu\_endpoint? + +> `optional` **menu\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L12) + +*** + +### moderation\_buttons + +> **moderation\_buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md)\> + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L13) + +*** + +### timestamp + +> **timestamp**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatAutoModMessage'` + +Defined in: [src/parser/classes/livechat/items/LiveChatAutoModMessage.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatAutoModMessage.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatAutoModMessage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatAutoModMessage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBanner.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBanner.md new file mode 100644 index 00000000..0aad6e66 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBanner.md @@ -0,0 +1,295 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatBanner + +# Class: LiveChatBanner + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatBanner**(`data`): `LiveChatBanner` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatBanner` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### action\_id + +> **action\_id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L11) + +*** + +### background\_type? + +> `optional` **background\_type**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L15) + +*** + +### banner\_properties\_auto\_collapse\_delay\_seconds? + +> `optional` **banner\_properties\_auto\_collapse\_delay\_seconds**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L18) + +*** + +### banner\_properties\_is\_ephemeral? + +> `optional` **banner\_properties\_is\_ephemeral**: `boolean` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L17) + +*** + +### banner\_type + +> **banner\_type**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L16) + +*** + +### contents + +> **contents**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L10) + +*** + +### header + +> **header**: [`LiveChatBannerHeader`](LiveChatBannerHeader.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L9) + +*** + +### is\_stackable + +> **is\_stackable**: `boolean` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L14) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### viewer\_is\_creator? + +> `optional` **viewer\_is\_creator**: `boolean` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatBanner'` + +Defined in: [src/parser/classes/livechat/items/LiveChatBanner.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBanner.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatBanner & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatBanner & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerChatSummary.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerChatSummary.md new file mode 100644 index 00000000..68a97604 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerChatSummary.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatBannerChatSummary + +# Class: LiveChatBannerChatSummary + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatBannerChatSummary**(`data`): `LiveChatBannerChatSummary` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatBannerChatSummary` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### chat\_summary + +> **chat\_summary**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts#L10) + +*** + +### dislike\_feedback\_button + +> **dislike\_feedback\_button**: [`ToggleButtonView`](ToggleButtonView.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts#L13) + +*** + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts#L11) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts#L9) + +*** + +### like\_feedback\_button + +> **like\_feedback\_button**: [`ToggleButtonView`](ToggleButtonView.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatBannerChatSummary'` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerChatSummary.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatBannerChatSummary & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatBannerChatSummary & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerHeader.md new file mode 100644 index 00000000..85cfbd2e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerHeader.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatBannerHeader + +# Class: LiveChatBannerHeader + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerHeader.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatBannerHeader**(`data`): `LiveChatBannerHeader` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerHeader.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatBannerHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### context\_menu\_button + +> **context\_menu\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerHeader.ts#L12) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerHeader.ts#L11) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerHeader.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatBannerHeader'` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerHeader.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatBannerHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatBannerHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerPoll.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerPoll.md new file mode 100644 index 00000000..0b2b5220 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerPoll.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatBannerPoll + +# Class: LiveChatBannerPoll + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatBannerPoll**(`data`): `LiveChatBannerPoll` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatBannerPoll` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_photo + +> **author\_photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L12) + +*** + +### choices + +> **choices**: `object`[] + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L14) + +#### option\_id + +> **option\_id**: `string` + +#### text + +> **text**: `string` + +*** + +### collapsed\_state\_entity\_key + +> **collapsed\_state\_entity\_key**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L19) + +*** + +### context\_menu\_button + +> **context\_menu\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L21) + +*** + +### live\_chat\_poll\_state\_entity\_key + +> **live\_chat\_poll\_state\_entity\_key**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L20) + +*** + +### poll\_question + +> **poll\_question**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatBannerPoll'` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerPoll.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerPoll.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatBannerPoll & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatBannerPoll & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerRedirect.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerRedirect.md new file mode 100644 index 00000000..64b120aa --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatBannerRedirect.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatBannerRedirect + +# Class: LiveChatBannerRedirect + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerRedirect.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatBannerRedirect**(`data`): `LiveChatBannerRedirect` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerRedirect.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatBannerRedirect` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_photo + +> **author\_photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerRedirect.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts#L12) + +*** + +### banner\_message + +> **banner\_message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerRedirect.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts#L11) + +*** + +### context\_menu\_button + +> **context\_menu\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerRedirect.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts#L14) + +*** + +### inline\_action\_button + +> **inline\_action\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerRedirect.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatBannerRedirect'` + +Defined in: [src/parser/classes/livechat/items/LiveChatBannerRedirect.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatBannerRedirect & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatBannerRedirect & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatDialog.md new file mode 100644 index 00000000..a9a3392a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatDialog.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatDialog + +# Class: LiveChatDialog + +Defined in: [src/parser/classes/LiveChatDialog.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatDialog.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatDialog**(`data`): `LiveChatDialog` + +Defined in: [src/parser/classes/LiveChatDialog.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatDialog.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### confirm\_button + +> **confirm\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/LiveChatDialog.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatDialog.ts#L9) + +*** + +### dialog\_messages + +> **dialog\_messages**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/LiveChatDialog.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatDialog.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatDialog'` + +Defined in: [src/parser/classes/LiveChatDialog.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatDialog.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatHeader.md new file mode 100644 index 00000000..48c04271 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatHeader.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatHeader + +# Class: LiveChatHeader + +Defined in: [src/parser/classes/LiveChatHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatHeader.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatHeader**(`data`): `LiveChatHeader` + +Defined in: [src/parser/classes/LiveChatHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatHeader.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### collapse\_button + +> **collapse\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/LiveChatHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatHeader.ts#L11) + +*** + +### overflow\_menu + +> **overflow\_menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/LiveChatHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatHeader.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_selector + +> **view\_selector**: [`SortFilterSubMenu`](SortFilterSubMenu.md) \| `null` + +Defined in: [src/parser/classes/LiveChatHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatHeader.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatHeader'` + +Defined in: [src/parser/classes/LiveChatHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatHeader.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemBumperView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemBumperView.md new file mode 100644 index 00000000..d075a7a4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemBumperView.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatItemBumperView + +# Class: LiveChatItemBumperView + +Defined in: [src/parser/classes/livechat/items/LiveChatItemBumperView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatItemBumperView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatItemBumperView**(`data`): `LiveChatItemBumperView` + +Defined in: [src/parser/classes/livechat/items/LiveChatItemBumperView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatItemBumperView.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatItemBumperView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`BumperUserEduContentView`](BumperUserEduContentView.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatItemBumperView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatItemBumperView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatItemBumperView'` + +Defined in: [src/parser/classes/livechat/items/LiveChatItemBumperView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatItemBumperView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatItemBumperView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatItemBumperView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemContextMenuEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemContextMenuEndpoint.md new file mode 100644 index 00000000..cae41a12 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemContextMenuEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatItemContextMenuEndpoint + +# Class: LiveChatItemContextMenuEndpoint + +Defined in: [src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`LiveChatItemContextMenuRequest`](../../../../type-aliases/LiveChatItemContextMenuRequest.md)\> + +## Constructors + +### Constructor + +> **new LiveChatItemContextMenuEndpoint**(`data`): `LiveChatItemContextMenuEndpoint` + +Defined in: [src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatItemContextMenuEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatItemContextMenuEndpoint'` + +Defined in: [src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`LiveChatItemContextMenuRequest`](../../../../type-aliases/LiveChatItemContextMenuRequest.md) + +Defined in: [src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts#L20) + +#### Returns + +[`LiveChatItemContextMenuRequest`](../../../../type-aliases/LiveChatItemContextMenuRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/LiveChatItemContextMenuEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatItemContextMenuEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatItemContextMenuEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemList.md new file mode 100644 index 00000000..fa49c7a5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatItemList.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatItemList + +# Class: LiveChatItemList + +Defined in: [src/parser/classes/LiveChatItemList.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatItemList.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatItemList**(`data`): `LiveChatItemList` + +Defined in: [src/parser/classes/LiveChatItemList.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatItemList.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatItemList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### max\_items\_to\_display + +> **max\_items\_to\_display**: `string` + +Defined in: [src/parser/classes/LiveChatItemList.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatItemList.ts#L8) + +*** + +### more\_comments\_below\_button + +> **more\_comments\_below\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/LiveChatItemList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatItemList.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatItemList'` + +Defined in: [src/parser/classes/LiveChatItemList.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatItemList.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatItemList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatItemList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatMembershipItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatMembershipItem.md new file mode 100644 index 00000000..5c57ef8d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatMembershipItem.md @@ -0,0 +1,295 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatMembershipItem + +# Class: LiveChatMembershipItem + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatMembershipItem**(`data`): `LiveChatMembershipItem` + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatMembershipItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L17) + +*** + +### context\_menu\_accessibility\_label + +> **context\_menu\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L19) + +*** + +### header\_primary\_text? + +> `optional` **header\_primary\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L14) + +*** + +### header\_subtext + +> **header\_subtext**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L15) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L10) + +*** + +### menu\_endpoint + +> **menu\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L18) + +*** + +### message? + +> `optional` **message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L16) + +*** + +### timestamp + +> **timestamp**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L11) + +*** + +### timestamp\_text? + +> `optional` **timestamp\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L13) + +*** + +### timestamp\_usec + +> **timestamp\_usec**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatMembershipItem'` + +Defined in: [src/parser/classes/livechat/items/LiveChatMembershipItem.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatMembershipItem.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatMembershipItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatMembershipItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatMessageInput.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatMessageInput.md new file mode 100644 index 00000000..518c8d3a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatMessageInput.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatMessageInput + +# Class: LiveChatMessageInput + +Defined in: [src/parser/classes/LiveChatMessageInput.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatMessageInput.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatMessageInput**(`data`): `LiveChatMessageInput` + +Defined in: [src/parser/classes/LiveChatMessageInput.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatMessageInput.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatMessageInput` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_name + +> **author\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/LiveChatMessageInput.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatMessageInput.ts#L10) + +*** + +### author\_photo + +> **author\_photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/LiveChatMessageInput.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatMessageInput.ts#L11) + +*** + +### send\_button + +> **send\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/LiveChatMessageInput.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatMessageInput.ts#L12) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/LiveChatMessageInput.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatMessageInput.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatMessageInput'` + +Defined in: [src/parser/classes/LiveChatMessageInput.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatMessageInput.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatMessageInput & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatMessageInput & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatModeChangeMessage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatModeChangeMessage.md new file mode 100644 index 00000000..b20aea37 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatModeChangeMessage.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatModeChangeMessage + +# Class: LiveChatModeChangeMessage + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatModeChangeMessage**(`data`): `LiveChatModeChangeMessage` + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatModeChangeMessage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L9) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L8) + +*** + +### subtext + +> **subtext**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L11) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L10) + +*** + +### timestamp + +> **timestamp**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L12) + +*** + +### timestamp\_text + +> **timestamp\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L14) + +*** + +### timestamp\_usec + +> **timestamp\_usec**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatModeChangeMessage'` + +Defined in: [src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatModeChangeMessage.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatModeChangeMessage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatModeChangeMessage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPaidMessage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPaidMessage.md new file mode 100644 index 00000000..9ac3b8e6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPaidMessage.md @@ -0,0 +1,383 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatPaidMessage + +# Class: LiveChatPaidMessage + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L11) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatPaidMessage**(`data`): `LiveChatPaidMessage` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L36) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatPaidMessage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L16) + +*** + +### author\_name\_text\_color + +> **author\_name\_text\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L17) + +*** + +### body\_background\_color + +> **body\_background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L20) + +*** + +### body\_text\_color + +> **body\_text\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L21) + +*** + +### context\_menu\_accessibility\_label + +> **context\_menu\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L24) + +*** + +### creator\_heart\_button + +> **creator\_heart\_button**: [`CreatorHeartView`](CreatorHeartView.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L32) + +*** + +### header\_background\_color + +> **header\_background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L18) + +*** + +### header\_overlay\_image? + +> `optional` **header\_overlay\_image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L29) + +*** + +### header\_text\_color + +> **header\_text\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L19) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L14) + +*** + +### is\_v2\_style + +> **is\_v2\_style**: `boolean` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L33) + +*** + +### lower\_bumper + +> **lower\_bumper**: [`LiveChatItemBumperView`](LiveChatItemBumperView.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L31) + +*** + +### menu\_endpoint + +> **menu\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L23) + +*** + +### message + +> **message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L15) + +*** + +### purchase\_amount + +> **purchase\_amount**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L22) + +*** + +### reply\_button + +> **reply\_button**: [`PdgReplyButtonView`](PdgReplyButtonView.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L34) + +*** + +### text\_input\_background\_color + +> **text\_input\_background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L30) + +*** + +### timestamp + +> **timestamp**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L25) + +*** + +### timestamp\_color + +> **timestamp\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L28) + +*** + +### timestamp\_text? + +> `optional` **timestamp\_text**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L27) + +*** + +### timestamp\_usec + +> **timestamp\_usec**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L26) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatPaidMessage'` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidMessage.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidMessage.ts#L12) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatPaidMessage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatPaidMessage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPaidSticker.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPaidSticker.md new file mode 100644 index 00000000..356ea7b4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPaidSticker.md @@ -0,0 +1,351 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatPaidSticker + +# Class: LiveChatPaidSticker + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatPaidSticker**(`data`): `LiveChatPaidSticker` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L29) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatPaidSticker` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L12) + +*** + +### author\_name\_text\_color + +> **author\_name\_text\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L16) + +*** + +### background\_color + +> **background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L15) + +*** + +### context\_menu + +> **context\_menu**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L23) + +*** + +### context\_menu\_accessibility\_label + +> **context\_menu\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L24) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L11) + +*** + +### is\_v2\_style + +> **is\_v2\_style**: `boolean` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L27) + +*** + +### menu\_endpoint + +> **menu\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L22) + +*** + +### money\_chip\_background\_color + +> **money\_chip\_background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L13) + +*** + +### money\_chip\_text\_color + +> **money\_chip\_text\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L14) + +*** + +### purchase\_amount + +> **purchase\_amount**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L21) + +*** + +### sticker + +> **sticker**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L17) + +*** + +### sticker\_accessibility\_label + +> **sticker\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L18) + +*** + +### sticker\_display\_height + +> **sticker\_display\_height**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L20) + +*** + +### sticker\_display\_width + +> **sticker\_display\_width**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L19) + +*** + +### timestamp + +> **timestamp**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L25) + +*** + +### timestamp\_usec + +> **timestamp\_usec**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L26) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatPaidSticker'` + +Defined in: [src/parser/classes/livechat/items/LiveChatPaidSticker.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPaidSticker.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatPaidSticker & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatPaidSticker & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatParticipant.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatParticipant.md new file mode 100644 index 00000000..9312e58c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatParticipant.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatParticipant + +# Class: LiveChatParticipant + +Defined in: [src/parser/classes/LiveChatParticipant.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipant.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatParticipant**(`data`): `LiveChatParticipant` + +Defined in: [src/parser/classes/LiveChatParticipant.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipant.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatParticipant` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/LiveChatParticipant.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipant.ts#L11) + +*** + +### name + +> **name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/LiveChatParticipant.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipant.ts#L9) + +*** + +### photo + +> **photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/LiveChatParticipant.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipant.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatParticipant'` + +Defined in: [src/parser/classes/LiveChatParticipant.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipant.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatParticipant & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatParticipant & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/LiveChatParticipantsList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatParticipantsList.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/LiveChatParticipantsList.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatParticipantsList.md index 69d30b73..3210614d 100644 --- a/docs/api/namespaces/YTNodes/classes/LiveChatParticipantsList.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatParticipantsList.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / LiveChatParticipantsList +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatParticipantsList # Class: LiveChatParticipantsList +Defined in: [src/parser/classes/LiveChatParticipantsList.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipantsList.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new LiveChatParticipantsList() +### Constructor -> **new LiveChatParticipantsList**(`data`): [`LiveChatParticipantsList`](LiveChatParticipantsList.md) +> **new LiveChatParticipantsList**(`data`): `LiveChatParticipantsList` + +Defined in: [src/parser/classes/LiveChatParticipantsList.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipantsList.ts#L12) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`LiveChatParticipantsList`](LiveChatParticipantsList.md) +`LiveChatParticipantsList` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/LiveChatParticipantsList.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChatParticipantsList.ts#L12) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **participants**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`LiveChatParticipant`](LiveChatParticipant.md)\> -#### Defined in - -[src/parser/classes/LiveChatParticipantsList.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChatParticipantsList.ts#L10) +Defined in: [src/parser/classes/LiveChatParticipantsList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipantsList.ts#L10) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/LiveChatParticipantsList.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChatParticipantsList.ts#L9) +Defined in: [src/parser/classes/LiveChatParticipantsList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipantsList.ts#L9) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'LiveChatParticipantsList'` +Defined in: [src/parser/classes/LiveChatParticipantsList.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LiveChatParticipantsList.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/LiveChatParticipantsList.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/LiveChatParticipantsList.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatParticipantsList & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPlaceholderItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPlaceholderItem.md new file mode 100644 index 00000000..5b6a2c8c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatPlaceholderItem.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatPlaceholderItem + +# Class: LiveChatPlaceholderItem + +Defined in: [src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatPlaceholderItem**(`data`): `LiveChatPlaceholderItem` + +Defined in: [src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatPlaceholderItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts#L7) + +*** + +### timestamp + +> **timestamp**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatPlaceholderItem'` + +Defined in: [src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatPlaceholderItem.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatPlaceholderItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatPlaceholderItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatProductItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatProductItem.md new file mode 100644 index 00000000..1f4f4ef4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatProductItem.md @@ -0,0 +1,327 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatProductItem + +# Class: LiveChatProductItem + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatProductItem**(`data`): `LiveChatProductItem` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L27) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatProductItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility\_title + +> **accessibility\_title**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L13) + +*** + +### author\_photo + +> **author\_photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L22) + +*** + +### creator\_custom\_message + +> **creator\_custom\_message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L25) + +*** + +### creator\_message + +> **creator\_message**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L20) + +*** + +### creator\_name + +> **creator\_name**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L21) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L19) + +*** + +### from\_vendor\_text + +> **from\_vendor\_text**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L17) + +*** + +### information\_button + +> **information\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L18) + +*** + +### information\_dialog + +> **information\_dialog**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L23) + +*** + +### is\_verified + +> **is\_verified**: `boolean` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L24) + +*** + +### price + +> **price**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L15) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L14) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### vendor\_name + +> **vendor\_name**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L16) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatProductItem'` + +Defined in: [src/parser/classes/livechat/items/LiveChatProductItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatProductItem.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatProductItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatProductItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatRestrictedParticipation.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatRestrictedParticipation.md new file mode 100644 index 00000000..827d21b2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatRestrictedParticipation.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatRestrictedParticipation + +# Class: LiveChatRestrictedParticipation + +Defined in: [src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatRestrictedParticipation**(`data`): `LiveChatRestrictedParticipation` + +Defined in: [src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatRestrictedParticipation` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts#L9) + +*** + +### message + +> **message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatRestrictedParticipation'` + +Defined in: [src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatRestrictedParticipation.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatRestrictedParticipation & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatRestrictedParticipation & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsGiftPurchaseAnnouncement.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsGiftPurchaseAnnouncement.md new file mode 100644 index 00000000..f7f11662 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsGiftPurchaseAnnouncement.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatSponsorshipsGiftPurchaseAnnouncement + +# Class: LiveChatSponsorshipsGiftPurchaseAnnouncement + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatSponsorshipsGiftPurchaseAnnouncement**(`data`): `LiveChatSponsorshipsGiftPurchaseAnnouncement` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatSponsorshipsGiftPurchaseAnnouncement` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_external\_channel\_id + +> **author\_external\_channel\_id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts#L10) + +*** + +### header + +> **header**: [`LiveChatSponsorshipsHeader`](LiveChatSponsorshipsHeader.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts#L11) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts#L8) + +*** + +### timestamp\_usec + +> **timestamp\_usec**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatSponsorshipsGiftPurchaseAnnouncement'` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatSponsorshipsGiftPurchaseAnnouncement & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatSponsorshipsGiftPurchaseAnnouncement & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsGiftRedemptionAnnouncement.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsGiftRedemptionAnnouncement.md new file mode 100644 index 00000000..0925bb9b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsGiftRedemptionAnnouncement.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatSponsorshipsGiftRedemptionAnnouncement + +# Class: LiveChatSponsorshipsGiftRedemptionAnnouncement + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatSponsorshipsGiftRedemptionAnnouncement**(`data`): `LiveChatSponsorshipsGiftRedemptionAnnouncement` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatSponsorshipsGiftRedemptionAnnouncement` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L13) + +*** + +### context\_menu\_accessibility\_label + +> **context\_menu\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L16) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L10) + +*** + +### menu\_endpoint + +> **menu\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L15) + +*** + +### message + +> **message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L14) + +*** + +### timestamp\_text + +> **timestamp\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L12) + +*** + +### timestamp\_usec + +> **timestamp\_usec**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatSponsorshipsGiftRedemptionAnnouncement'` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatSponsorshipsGiftRedemptionAnnouncement & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatSponsorshipsGiftRedemptionAnnouncement & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsHeader.md new file mode 100644 index 00000000..5edd444a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatSponsorshipsHeader.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatSponsorshipsHeader + +# Class: LiveChatSponsorshipsHeader + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatSponsorshipsHeader**(`data`): `LiveChatSponsorshipsHeader` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatSponsorshipsHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_badges + +> **author\_badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`LiveChatAuthorBadge`](LiveChatAuthorBadge.md)\> + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L15) + +*** + +### author\_name + +> **author\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L13) + +*** + +### author\_photo + +> **author\_photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L14) + +*** + +### context\_menu\_accessibility\_label + +> **context\_menu\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L18) + +*** + +### image + +> **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L19) + +*** + +### menu\_endpoint + +> **menu\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L17) + +*** + +### primary\_text + +> **primary\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatSponsorshipsHeader'` + +Defined in: [src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatSponsorshipsHeader.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatSponsorshipsHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatSponsorshipsHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTextMessage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTextMessage.md new file mode 100644 index 00000000..ca78ba0b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTextMessage.md @@ -0,0 +1,295 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatTextMessage + +# Class: LiveChatTextMessage + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatTextMessage**(`data`): `LiveChatTextMessage` + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L24) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatTextMessage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L19) + +*** + +### before\_content\_buttons + +> **before\_content\_buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ButtonView`](ButtonView.md)\> + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L22) + +*** + +### context\_menu\_accessibility\_label? + +> `optional` **context\_menu\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L21) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L13) + +*** + +### inline\_action\_buttons + +> **inline\_action\_buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md)\> + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L15) + +*** + +### menu\_endpoint? + +> `optional` **menu\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L20) + +*** + +### message + +> **message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L14) + +*** + +### timestamp + +> **timestamp**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L16) + +*** + +### timestamp\_text? + +> `optional` **timestamp\_text**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L18) + +*** + +### timestamp\_usec + +> **timestamp\_usec**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L17) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatTextMessage'` + +Defined in: [src/parser/classes/livechat/items/LiveChatTextMessage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTextMessage.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatTextMessage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatTextMessage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerPaidMessageItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerPaidMessageItem.md new file mode 100644 index 00000000..be2cdfaf --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerPaidMessageItem.md @@ -0,0 +1,311 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatTickerPaidMessageItem + +# Class: LiveChatTickerPaidMessageItem + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatTickerPaidMessageItem**(`data`): `LiveChatTickerPaidMessageItem` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L25) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatTickerPaidMessageItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### amount? + +> `optional` **amount**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L14) + +*** + +### amount\_text\_color + +> **amount\_text\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L15) + +*** + +### animation\_origin + +> **animation\_origin**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L22) + +*** + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L13) + +*** + +### duration\_sec + +> **duration\_sec**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L18) + +*** + +### end\_background\_color + +> **end\_background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L17) + +*** + +### full\_duration\_sec + +> **full\_duration\_sec**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L19) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L12) + +*** + +### open\_engagement\_panel\_command + +> **open\_engagement\_panel\_command**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L23) + +*** + +### show\_item + +> **show\_item**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L20) + +*** + +### show\_item\_endpoint + +> **show\_item\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L21) + +*** + +### start\_background\_color + +> **start\_background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatTickerPaidMessageItem'` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidMessageItem.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatTickerPaidMessageItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatTickerPaidMessageItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerPaidStickerItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerPaidStickerItem.md new file mode 100644 index 00000000..af99f7ec --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerPaidStickerItem.md @@ -0,0 +1,303 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatTickerPaidStickerItem + +# Class: LiveChatTickerPaidStickerItem + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatTickerPaidStickerItem**(`data`): `LiveChatTickerPaidStickerItem` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatTickerPaidStickerItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author\_external\_channel\_id + +> **author\_external\_channel\_id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L10) + +*** + +### author\_photo + +> **author\_photo**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L11) + +*** + +### duration\_sec + +> **duration\_sec**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L14) + +*** + +### end\_background\_color + +> **end\_background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L13) + +*** + +### full\_duration\_sec + +> **full\_duration\_sec**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L15) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L9) + +*** + +### show\_item + +> **show\_item**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L16) + +*** + +### show\_item\_endpoint + +> **show\_item\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L17) + +*** + +### start\_background\_color + +> **start\_background\_color**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L12) + +*** + +### ticker\_thumbnails + +> **ticker\_thumbnails**: `object`[] + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L18) + +#### label? + +> `optional` **label**: `string` + +#### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatTickerPaidStickerItem'` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerPaidStickerItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatTickerPaidStickerItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatTickerPaidStickerItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerSponsorItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerSponsorItem.md new file mode 100644 index 00000000..e6915ff2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatTickerSponsorItem.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatTickerSponsorItem + +# Class: LiveChatTickerSponsorItem + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatTickerSponsorItem**(`data`): `LiveChatTickerSponsorItem` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatTickerSponsorItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts#L11) + +*** + +### detail + +> **detail**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts#L10) + +*** + +### duration\_sec + +> **duration\_sec**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts#L12) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatTickerSponsorItem'` + +Defined in: [src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatTickerSponsorItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatTickerSponsorItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatTickerSponsorItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatViewerEngagementMessage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatViewerEngagementMessage.md new file mode 100644 index 00000000..4780ba23 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LiveChatViewerEngagementMessage.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LiveChatViewerEngagementMessage + +# Class: LiveChatViewerEngagementMessage + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LiveChatViewerEngagementMessage**(`data`): `LiveChatViewerEngagementMessage` + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L19) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LiveChatViewerEngagementMessage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### action\_button + +> **action\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L15) + +*** + +### context\_menu\_accessibility\_label? + +> `optional` **context\_menu\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L17) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L13) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L10) + +*** + +### menu\_endpoint? + +> `optional` **menu\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L16) + +*** + +### message + +> **message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L14) + +*** + +### timestamp? + +> `optional` **timestamp**: `number` + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L11) + +*** + +### timestamp\_usec? + +> `optional` **timestamp\_usec**: `string` + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LiveChatViewerEngagementMessage'` + +Defined in: [src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatViewerEngagementMessage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LiveChatViewerEngagementMessage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LockupMetadataView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LockupMetadataView.md new file mode 100644 index 00000000..6b9e3555 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LockupMetadataView.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LockupMetadataView + +# Class: LockupMetadataView + +Defined in: [src/parser/classes/LockupMetadataView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupMetadataView.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LockupMetadataView**(`data`): `LockupMetadataView` + +Defined in: [src/parser/classes/LockupMetadataView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupMetadataView.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LockupMetadataView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### image + +> **image**: [`AvatarStackView`](AvatarStackView.md) \| [`DecoratedAvatarView`](DecoratedAvatarView.md) \| `null` + +Defined in: [src/parser/classes/LockupMetadataView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupMetadataView.ts#L14) + +*** + +### menu\_button + +> **menu\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/LockupMetadataView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupMetadataView.ts#L15) + +*** + +### metadata + +> **metadata**: [`ContentMetadataView`](ContentMetadataView.md) \| `null` + +Defined in: [src/parser/classes/LockupMetadataView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupMetadataView.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/LockupMetadataView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupMetadataView.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LockupMetadataView'` + +Defined in: [src/parser/classes/LockupMetadataView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupMetadataView.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LockupMetadataView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LockupMetadataView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/LockupView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/LockupView.md new file mode 100644 index 00000000..25ac1f42 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/LockupView.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / LockupView + +# Class: LockupView + +Defined in: [src/parser/classes/LockupView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupView.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new LockupView**(`data`): `LockupView` + +Defined in: [src/parser/classes/LockupView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupView.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`LockupView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content\_id + +> **content\_id**: `string` + +Defined in: [src/parser/classes/LockupView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupView.ts#L13) + +*** + +### content\_image + +> **content\_image**: [`ThumbnailView`](ThumbnailView.md) \| [`CollectionThumbnailView`](CollectionThumbnailView.md) \| `null` + +Defined in: [src/parser/classes/LockupView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupView.ts#L11) + +*** + +### content\_type + +> **content\_type**: `"UNSPECIFIED"` \| `"VIDEO"` \| `"PLAYLIST"` \| `"SHORT"` \| `"CHANNEL"` \| `"ALBUM"` \| `"PRODUCT"` \| `"GAME"` \| `"CLIP"` \| `"PODCAST"` \| `"SOURCE"` \| `"SHOPPING_COLLECTION"` \| `"MOVIE"` + +Defined in: [src/parser/classes/LockupView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupView.ts#L14) + +*** + +### metadata + +> **metadata**: [`LockupMetadataView`](LockupMetadataView.md) \| `null` + +Defined in: [src/parser/classes/LockupView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupView.ts#L12) + +*** + +### renderer\_context + +> **renderer\_context**: [`RendererContext`](../../Misc/classes/RendererContext.md) + +Defined in: [src/parser/classes/LockupView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupView.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'LockupView'` + +Defined in: [src/parser/classes/LockupView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/LockupView.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is LockupView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is LockupView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersInfoItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersInfoItem.md new file mode 100644 index 00000000..bf7c32ca --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersInfoItem.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MacroMarkersInfoItem + +# Class: MacroMarkersInfoItem + +Defined in: [src/parser/classes/MacroMarkersInfoItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersInfoItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MacroMarkersInfoItem**(`data`): `MacroMarkersInfoItem` + +Defined in: [src/parser/classes/MacroMarkersInfoItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersInfoItem.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MacroMarkersInfoItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### info\_text + +> **info\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MacroMarkersInfoItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersInfoItem.ts#L9) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/MacroMarkersInfoItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersInfoItem.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MacroMarkersInfoItem'` + +Defined in: [src/parser/classes/MacroMarkersInfoItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersInfoItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MacroMarkersInfoItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MacroMarkersInfoItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MacroMarkersList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersList.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/MacroMarkersList.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersList.md index f91b6d48..9c347d78 100644 --- a/docs/api/namespaces/YTNodes/classes/MacroMarkersList.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersList.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MacroMarkersList +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MacroMarkersList # Class: MacroMarkersList +Defined in: [src/parser/classes/MacroMarkersList.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersList.ts#L7) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MacroMarkersList() +### Constructor -> **new MacroMarkersList**(`data`): [`MacroMarkersList`](MacroMarkersList.md) +> **new MacroMarkersList**(`data`): `MacroMarkersList` + +Defined in: [src/parser/classes/MacroMarkersList.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersList.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MacroMarkersList`](MacroMarkersList.md) +`MacroMarkersList` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MacroMarkersList.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MacroMarkersList.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MacroMarkersListItem`](MacroMarkersListItem.md) \| [`MacroMarkersInfoItem`](MacroMarkersInfoItem.md)\> -#### Defined in - -[src/parser/classes/MacroMarkersList.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MacroMarkersList.ts#L10) +Defined in: [src/parser/classes/MacroMarkersList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersList.ts#L10) *** @@ -44,9 +44,7 @@ > **sync\_button\_label**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/MacroMarkersList.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MacroMarkersList.ts#L11) +Defined in: [src/parser/classes/MacroMarkersList.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersList.ts#L11) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MacroMarkersList'` +Defined in: [src/parser/classes/MacroMarkersList.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersList.ts#L8) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MacroMarkersList.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MacroMarkersList.ts#L8) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MacroMarkersList & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersListEntity.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersListEntity.md new file mode 100644 index 00000000..30c88965 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersListEntity.md @@ -0,0 +1,317 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MacroMarkersListEntity + +# Class: MacroMarkersListEntity + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L13) + +Represents a list of markers for a video. Can contain different types of markers: +- MARKER_TYPE_HEATMAP: Heat map markers showing audience engagement data +- Other marker types may exist but are not currently handled + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MacroMarkersListEntity**(`data`): `MacroMarkersListEntity` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L30) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MacroMarkersListEntity` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### external\_video\_id + +> **external\_video\_id**: `string` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L17) + +*** + +### marker\_entity\_key + +> **marker\_entity\_key**: `string` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L16) + +*** + +### marker\_type + +> **marker\_type**: `string` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L19) + +The type of markers in this entity (e.g., 'MARKER_TYPE_HEATMAP') + +*** + +### markers + +> **markers**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`HeatMarker`](HeatMarker.md)\> + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L20) + +*** + +### max\_height\_dp + +> **max\_height\_dp**: `number` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L21) + +*** + +### min\_height\_dp + +> **min\_height\_dp**: `number` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L22) + +*** + +### show\_hide\_animation\_duration\_millis + +> **show\_hide\_animation\_duration\_millis**: `number` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L23) + +*** + +### timed\_marker\_decorations + +> **timed\_marker\_decorations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`TimedMarkerDecoration`](TimedMarkerDecoration.md)\> + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L24) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MacroMarkersListEntity'` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L14) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MacroMarkersListEntity & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MacroMarkersListEntity & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### isHeatmap() + +> **isHeatmap**(): `boolean` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:65](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L65) + +Checks if this MacroMarkersListEntity represents heatmap data. +Only heatmap markers can be converted to Heatmap objects. + +#### Returns + +`boolean` + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) + +*** + +### toHeatmap() + +> **toHeatmap**(): [`Heatmap`](Heatmap.md) \| `null` + +Defined in: [src/parser/classes/MacroMarkersListEntity.ts:74](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListEntity.ts#L74) + +Converts this MacroMarkersListEntity to a Heatmap object +for compatibility with existing code. Only works for heatmap markers. + +#### Returns + +[`Heatmap`](Heatmap.md) \| `null` + +Heatmap object if this entity contains heatmap data, null otherwise diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersListItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersListItem.md new file mode 100644 index 00000000..2d714b77 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MacroMarkersListItem.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MacroMarkersListItem + +# Class: MacroMarkersListItem + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MacroMarkersListItem**(`data`): `MacroMarkersListItem` + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MacroMarkersListItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### is\_highlighted + +> **is\_highlighted**: `boolean` + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L16) + +*** + +### layout + +> **layout**: `string` + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L15) + +*** + +### on\_tap\_endpoint + +> **on\_tap\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L14) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L13) + +*** + +### time\_description + +> **time\_description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MacroMarkersListItem'` + +Defined in: [src/parser/classes/MacroMarkersListItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MacroMarkersListItem.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MacroMarkersListItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MacroMarkersListItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MarkChatItemAsDeletedAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MarkChatItemAsDeletedAction.md new file mode 100644 index 00000000..9e6740ac --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MarkChatItemAsDeletedAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MarkChatItemAsDeletedAction + +# Class: MarkChatItemAsDeletedAction + +Defined in: [src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MarkChatItemAsDeletedAction**(`data`): `MarkChatItemAsDeletedAction` + +Defined in: [src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MarkChatItemAsDeletedAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### deleted\_state\_message + +> **deleted\_state\_message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts#L8) + +*** + +### target\_item\_id + +> **target\_item\_id**: `string` + +Defined in: [src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MarkChatItemAsDeletedAction'` + +Defined in: [src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemAsDeletedAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MarkChatItemAsDeletedAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MarkChatItemAsDeletedAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MarkChatItemsByAuthorAsDeletedAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MarkChatItemsByAuthorAsDeletedAction.md new file mode 100644 index 00000000..b8ef7b57 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MarkChatItemsByAuthorAsDeletedAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MarkChatItemsByAuthorAsDeletedAction + +# Class: MarkChatItemsByAuthorAsDeletedAction + +Defined in: [src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MarkChatItemsByAuthorAsDeletedAction**(`data`): `MarkChatItemsByAuthorAsDeletedAction` + +Defined in: [src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MarkChatItemsByAuthorAsDeletedAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### deleted\_state\_message + +> **deleted\_state\_message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts#L8) + +*** + +### external\_channel\_id + +> **external\_channel\_id**: `string` + +Defined in: [src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MarkChatItemsByAuthorAsDeletedAction'` + +Defined in: [src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/MarkChatItemsByAuthorAsDeletedAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MarkChatItemsByAuthorAsDeletedAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MarkChatItemsByAuthorAsDeletedAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Menu.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Menu.md new file mode 100644 index 00000000..ce0f901c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Menu.md @@ -0,0 +1,275 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Menu + +# Class: Menu + +Defined in: [src/parser/classes/menus/Menu.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L14) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Menu**(`data`): `Menu` + +Defined in: [src/parser/classes/menus/Menu.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L22) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Menu` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/menus/Menu.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L20) + +*** + +### flexible\_items + +> **flexible\_items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MenuFlexibleItem`](MenuFlexibleItem.md)\> + +Defined in: [src/parser/classes/menus/Menu.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L18) + +*** + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/menus/Menu.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L17) + +*** + +### top\_level\_buttons + +> **top\_level\_buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md) \| [`ToggleButton`](ToggleButton.md) \| [`ButtonView`](ButtonView.md) \| [`SegmentedLikeDislikeButtonView`](SegmentedLikeDislikeButtonView.md) \| [`LikeButton`](LikeButton.md) \| [`FlexibleActionsView`](FlexibleActionsView.md)\> + +Defined in: [src/parser/classes/menus/Menu.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L19) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Menu'` + +Defined in: [src/parser/classes/menus/Menu.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L15) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/menus/Menu.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L41) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +*** + +### label + +#### Get Signature + +> **get** **label**(): `string` \| `undefined` + +Defined in: [src/parser/classes/menus/Menu.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/Menu.ts#L36) + +##### Returns + +`string` \| `undefined` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Menu & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Menu & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuFlexibleItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuFlexibleItem.md new file mode 100644 index 00000000..27e30caf --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuFlexibleItem.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MenuFlexibleItem + +# Class: MenuFlexibleItem + +Defined in: [src/parser/classes/menus/MenuFlexibleItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuFlexibleItem.ts#L11) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MenuFlexibleItem**(`data`): `MenuFlexibleItem` + +Defined in: [src/parser/classes/menus/MenuFlexibleItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuFlexibleItem.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MenuFlexibleItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### menu\_item + +> **menu\_item**: [`MenuServiceItem`](MenuServiceItem.md) \| [`MenuServiceItemDownload`](MenuServiceItemDownload.md) \| `null` + +Defined in: [src/parser/classes/menus/MenuFlexibleItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuFlexibleItem.ts#L14) + +*** + +### top\_level\_button + +> **top\_level\_button**: [`Button`](Button.md) \| [`ButtonView`](ButtonView.md) \| [`DownloadButton`](DownloadButton.md) \| `null` + +Defined in: [src/parser/classes/menus/MenuFlexibleItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuFlexibleItem.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MenuFlexibleItem'` + +Defined in: [src/parser/classes/menus/MenuFlexibleItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuFlexibleItem.ts#L12) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MenuFlexibleItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MenuFlexibleItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuNavigationItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuNavigationItem.md new file mode 100644 index 00000000..3898c806 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuNavigationItem.md @@ -0,0 +1,335 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MenuNavigationItem + +# Class: MenuNavigationItem + +Defined in: [src/parser/classes/menus/MenuNavigationItem.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuNavigationItem.ts#L4) + +## Extends + +- [`Button`](Button.md) + +## Constructors + +### Constructor + +> **new MenuNavigationItem**(`data`): `MenuNavigationItem` + +Defined in: [src/parser/classes/menus/MenuNavigationItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuNavigationItem.ts#L7) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MenuNavigationItem` + +#### Overrides + +[`Button`](Button.md).[`constructor`](Button.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/Button.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L19) + +#### Inherited from + +[`Button`](Button.md).[`accessibility`](Button.md#accessibility) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Button.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L18) + +#### Inherited from + +[`Button`](Button.md).[`endpoint`](Button.md#endpoint) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/Button.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L15) + +#### Inherited from + +[`Button`](Button.md).[`icon_type`](Button.md#icon_type) + +*** + +### is\_disabled? + +> `optional` **is\_disabled**: `boolean` + +Defined in: [src/parser/classes/Button.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L16) + +#### Inherited from + +[`Button`](Button.md).[`is_disabled`](Button.md#is_disabled) + +*** + +### label? + +> `optional` **label**: `string` + +Defined in: [src/parser/classes/Button.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L11) + +#### Inherited from + +[`Button`](Button.md).[`label`](Button.md#label) + +*** + +### size? + +> `optional` **size**: `string` + +Defined in: [src/parser/classes/Button.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L14) + +#### Inherited from + +[`Button`](Button.md).[`size`](Button.md#size) + +*** + +### style? + +> `optional` **style**: `string` + +Defined in: [src/parser/classes/Button.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L13) + +#### Inherited from + +[`Button`](Button.md).[`style`](Button.md#style) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/Button.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L17) + +#### Inherited from + +[`Button`](Button.md).[`target_id`](Button.md#target_id) + +*** + +### text? + +> `optional` **text**: `string` + +Defined in: [src/parser/classes/Button.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L10) + +#### Inherited from + +[`Button`](Button.md).[`text`](Button.md#text) + +*** + +### tooltip? + +> `optional` **tooltip**: `string` + +Defined in: [src/parser/classes/Button.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L12) + +#### Inherited from + +[`Button`](Button.md).[`tooltip`](Button.md#tooltip) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`Button`](Button.md).[`type`](Button.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MenuNavigationItem'` + +Defined in: [src/parser/classes/menus/MenuNavigationItem.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuNavigationItem.ts#L5) + +#### Overrides + +[`Button`](Button.md).[`type`](Button.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`Button`](Button.md).[`as`](Button.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MenuNavigationItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MenuNavigationItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`Button`](Button.md).[`hasKey`](Button.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`Button`](Button.md).[`is`](Button.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`Button`](Button.md).[`key`](Button.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MenuPopup.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuPopup.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/MenuPopup.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MenuPopup.md index 36ec822a..779726ba 100644 --- a/docs/api/namespaces/YTNodes/classes/MenuPopup.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuPopup.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MenuPopup +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MenuPopup # Class: MenuPopup +Defined in: [src/parser/classes/menus/MenuPopup.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuPopup.ts#L8) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MenuPopup() +### Constructor -> **new MenuPopup**(`data`): [`MenuPopup`](MenuPopup.md) +> **new MenuPopup**(`data`): `MenuPopup` + +Defined in: [src/parser/classes/menus/MenuPopup.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuPopup.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MenuPopup`](MenuPopup.md) +`MenuPopup` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/menus/MenuPopup.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MenuPopup.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MenuServiceItem`](MenuServiceItem.md) \| [`MenuNavigationItem`](MenuNavigationItem.md)\> -#### Defined in - -[src/parser/classes/menus/MenuPopup.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MenuPopup.ts#L11) +Defined in: [src/parser/classes/menus/MenuPopup.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuPopup.ts#L11) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MenuPopup'` +Defined in: [src/parser/classes/menus/MenuPopup.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuPopup.ts#L9) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/menus/MenuPopup.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MenuPopup.ts#L9) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MenuPopup & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuServiceItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuServiceItem.md new file mode 100644 index 00000000..b6473770 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuServiceItem.md @@ -0,0 +1,335 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MenuServiceItem + +# Class: MenuServiceItem + +Defined in: [src/parser/classes/menus/MenuServiceItem.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuServiceItem.ts#L4) + +## Extends + +- [`Button`](Button.md) + +## Constructors + +### Constructor + +> **new MenuServiceItem**(`data`): `MenuServiceItem` + +Defined in: [src/parser/classes/menus/MenuServiceItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuServiceItem.ts#L7) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MenuServiceItem` + +#### Overrides + +[`Button`](Button.md).[`constructor`](Button.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/Button.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L19) + +#### Inherited from + +[`Button`](Button.md).[`accessibility`](Button.md#accessibility) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Button.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L18) + +#### Inherited from + +[`Button`](Button.md).[`endpoint`](Button.md#endpoint) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/Button.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L15) + +#### Inherited from + +[`Button`](Button.md).[`icon_type`](Button.md#icon_type) + +*** + +### is\_disabled? + +> `optional` **is\_disabled**: `boolean` + +Defined in: [src/parser/classes/Button.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L16) + +#### Inherited from + +[`Button`](Button.md).[`is_disabled`](Button.md#is_disabled) + +*** + +### label? + +> `optional` **label**: `string` + +Defined in: [src/parser/classes/Button.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L11) + +#### Inherited from + +[`Button`](Button.md).[`label`](Button.md#label) + +*** + +### size? + +> `optional` **size**: `string` + +Defined in: [src/parser/classes/Button.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L14) + +#### Inherited from + +[`Button`](Button.md).[`size`](Button.md#size) + +*** + +### style? + +> `optional` **style**: `string` + +Defined in: [src/parser/classes/Button.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L13) + +#### Inherited from + +[`Button`](Button.md).[`style`](Button.md#style) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/Button.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L17) + +#### Inherited from + +[`Button`](Button.md).[`target_id`](Button.md#target_id) + +*** + +### text? + +> `optional` **text**: `string` + +Defined in: [src/parser/classes/Button.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L10) + +#### Inherited from + +[`Button`](Button.md).[`text`](Button.md#text) + +*** + +### tooltip? + +> `optional` **tooltip**: `string` + +Defined in: [src/parser/classes/Button.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Button.ts#L12) + +#### Inherited from + +[`Button`](Button.md).[`tooltip`](Button.md#tooltip) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`Button`](Button.md).[`type`](Button.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MenuServiceItem'` + +Defined in: [src/parser/classes/menus/MenuServiceItem.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuServiceItem.ts#L5) + +#### Overrides + +[`Button`](Button.md).[`type`](Button.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`Button`](Button.md).[`as`](Button.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MenuServiceItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MenuServiceItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`Button`](Button.md).[`hasKey`](Button.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`Button`](Button.md).[`is`](Button.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`Button`](Button.md).[`key`](Button.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuServiceItemDownload.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuServiceItemDownload.md new file mode 100644 index 00000000..b6c11381 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuServiceItemDownload.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MenuServiceItemDownload + +# Class: MenuServiceItemDownload + +Defined in: [src/parser/classes/menus/MenuServiceItemDownload.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuServiceItemDownload.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MenuServiceItemDownload**(`data`): `MenuServiceItemDownload` + +Defined in: [src/parser/classes/menus/MenuServiceItemDownload.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuServiceItemDownload.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MenuServiceItemDownload` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/menus/MenuServiceItemDownload.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuServiceItemDownload.ts#L9) + +*** + +### has\_separator + +> **has\_separator**: `boolean` + +Defined in: [src/parser/classes/menus/MenuServiceItemDownload.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuServiceItemDownload.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MenuServiceItemDownload'` + +Defined in: [src/parser/classes/menus/MenuServiceItemDownload.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MenuServiceItemDownload.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MenuServiceItemDownload & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MenuServiceItemDownload & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MenuTitle.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuTitle.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/MenuTitle.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MenuTitle.md index 86dc98b7..6ff567a7 100644 --- a/docs/api/namespaces/YTNodes/classes/MenuTitle.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MenuTitle.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MenuTitle +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MenuTitle # Class: MenuTitle +Defined in: [src/parser/classes/MenuTitle.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MenuTitle.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MenuTitle() +### Constructor -> **new MenuTitle**(`data`): [`MenuTitle`](MenuTitle.md) +> **new MenuTitle**(`data`): `MenuTitle` + +Defined in: [src/parser/classes/MenuTitle.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MenuTitle.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MenuTitle`](MenuTitle.md) +`MenuTitle` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MenuTitle.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MenuTitle.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/MenuTitle.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MenuTitle.ts#L8) +Defined in: [src/parser/classes/MenuTitle.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MenuTitle.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MenuTitle'` +Defined in: [src/parser/classes/MenuTitle.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MenuTitle.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MenuTitle.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MenuTitle.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MenuTitle & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MerchandiseItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MerchandiseItem.md new file mode 100644 index 00000000..e5151da8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MerchandiseItem.md @@ -0,0 +1,303 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MerchandiseItem + +# Class: MerchandiseItem + +Defined in: [src/parser/classes/MerchandiseItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MerchandiseItem**(`data`): `MerchandiseItem` + +Defined in: [src/parser/classes/MerchandiseItem.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MerchandiseItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### additional\_fees\_text + +> **additional\_fees\_text**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L17) + +*** + +### button\_accessibility\_text + +> **button\_accessibility\_text**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L15) + +*** + +### button\_text + +> **button\_text**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L14) + +*** + +### description + +> **description**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L10) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MerchandiseItem.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L19) + +*** + +### from\_vendor\_text + +> **from\_vendor\_text**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L16) + +*** + +### price + +> **price**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L12) + +*** + +### region\_format + +> **region\_format**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L18) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/MerchandiseItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L11) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### vendor\_name + +> **vendor\_name**: `string` + +Defined in: [src/parser/classes/MerchandiseItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L13) + +*** + +### type + +> `static` **type**: `string` = `'MerchandiseItem'` + +Defined in: [src/parser/classes/MerchandiseItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MerchandiseItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MerchandiseItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MerchandiseShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MerchandiseShelf.md new file mode 100644 index 00000000..0d6ca129 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MerchandiseShelf.md @@ -0,0 +1,253 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MerchandiseShelf + +# Class: MerchandiseShelf + +Defined in: [src/parser/classes/MerchandiseShelf.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseShelf.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MerchandiseShelf**(`data`): `MerchandiseShelf` + +Defined in: [src/parser/classes/MerchandiseShelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseShelf.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MerchandiseShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/MerchandiseShelf.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseShelf.ts#L9) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/MerchandiseShelf.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseShelf.ts#L8) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/MerchandiseShelf.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseShelf.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MerchandiseShelf'` + +Defined in: [src/parser/classes/MerchandiseShelf.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseShelf.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/MerchandiseShelf.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MerchandiseShelf.ts#L19) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MerchandiseShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MerchandiseShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Message.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Message.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/Message.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Message.md index 361a8fa9..c43c9c04 100644 --- a/docs/api/namespaces/YTNodes/classes/Message.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Message.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Message +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Message # Class: Message +Defined in: [src/parser/classes/Message.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Message.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Message() +### Constructor -> **new Message**(`data`): [`Message`](Message.md) +> **new Message**(`data`): `Message` + +Defined in: [src/parser/classes/Message.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Message.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Message`](Message.md) +`Message` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Message.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Message.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **text**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/Message.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Message.ts#L8) +Defined in: [src/parser/classes/Message.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Message.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Message'` +Defined in: [src/parser/classes/Message.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Message.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Message.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Message.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Message & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataBadge.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataBadge.md new file mode 100644 index 00000000..94d92bd6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataBadge.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MetadataBadge + +# Class: MetadataBadge + +Defined in: [src/parser/classes/MetadataBadge.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`LiveChatAuthorBadge`](LiveChatAuthorBadge.md) + +## Constructors + +### Constructor + +> **new MetadataBadge**(`data`): `MetadataBadge` + +Defined in: [src/parser/classes/MetadataBadge.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MetadataBadge` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/MetadataBadge.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L7) + +*** + +### label? + +> `optional` **label**: `string` + +Defined in: [src/parser/classes/MetadataBadge.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L9) + +*** + +### style? + +> `optional` **style**: `string` + +Defined in: [src/parser/classes/MetadataBadge.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L8) + +*** + +### tooltip? + +> `optional` **tooltip**: `string` + +Defined in: [src/parser/classes/MetadataBadge.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MetadataBadge'` + +Defined in: [src/parser/classes/MetadataBadge.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataBadge.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MetadataBadge & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MetadataBadge & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MetadataRow.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRow.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/MetadataRow.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRow.md index e49d9354..d33304ef 100644 --- a/docs/api/namespaces/YTNodes/classes/MetadataRow.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRow.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MetadataRow +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MetadataRow # Class: MetadataRow +Defined in: [src/parser/classes/MetadataRow.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRow.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MetadataRow() +### Constructor -> **new MetadataRow**(`data`): [`MetadataRow`](MetadataRow.md) +> **new MetadataRow**(`data`): `MetadataRow` + +Defined in: [src/parser/classes/MetadataRow.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRow.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MetadataRow`](MetadataRow.md) +`MetadataRow` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MetadataRow.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataRow.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`Text`](../../Misc/classes/Text.md)[] -#### Defined in - -[src/parser/classes/MetadataRow.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataRow.ts#L9) +Defined in: [src/parser/classes/MetadataRow.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRow.ts#L9) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/MetadataRow.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataRow.ts#L8) +Defined in: [src/parser/classes/MetadataRow.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRow.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MetadataRow'` +Defined in: [src/parser/classes/MetadataRow.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRow.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MetadataRow.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataRow.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MetadataRow & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/MetadataRowContainer.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRowContainer.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/MetadataRowContainer.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRowContainer.md index 15f1aff9..0a1bc137 100644 --- a/docs/api/namespaces/YTNodes/classes/MetadataRowContainer.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRowContainer.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MetadataRowContainer +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MetadataRowContainer # Class: MetadataRowContainer +Defined in: [src/parser/classes/MetadataRowContainer.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowContainer.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MetadataRowContainer() +### Constructor -> **new MetadataRowContainer**(`data`): [`MetadataRowContainer`](MetadataRowContainer.md) +> **new MetadataRowContainer**(`data`): `MetadataRowContainer` + +Defined in: [src/parser/classes/MetadataRowContainer.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowContainer.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MetadataRowContainer`](MetadataRowContainer.md) +`MetadataRowContainer` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MetadataRowContainer.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataRowContainer.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **collapsed\_item\_count**: `number` -#### Defined in - -[src/parser/classes/MetadataRowContainer.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataRowContainer.ts#L8) +Defined in: [src/parser/classes/MetadataRowContainer.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowContainer.ts#L8) *** @@ -44,9 +44,7 @@ > **rows**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/MetadataRowContainer.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataRowContainer.ts#L7) +Defined in: [src/parser/classes/MetadataRowContainer.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowContainer.ts#L7) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MetadataRowContainer'` +Defined in: [src/parser/classes/MetadataRowContainer.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowContainer.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MetadataRowContainer.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataRowContainer.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MetadataRowContainer & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRowHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRowHeader.md new file mode 100644 index 00000000..95e68e81 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataRowHeader.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MetadataRowHeader + +# Class: MetadataRowHeader + +Defined in: [src/parser/classes/MetadataRowHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowHeader.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MetadataRowHeader**(`data`): `MetadataRowHeader` + +Defined in: [src/parser/classes/MetadataRowHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowHeader.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MetadataRowHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MetadataRowHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowHeader.ts#L8) + +*** + +### has\_divider\_line + +> **has\_divider\_line**: `boolean` + +Defined in: [src/parser/classes/MetadataRowHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowHeader.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MetadataRowHeader'` + +Defined in: [src/parser/classes/MetadataRowHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataRowHeader.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MetadataRowHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MetadataRowHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MetadataScreen.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataScreen.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/MetadataScreen.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataScreen.md index d050520b..585a7e5a 100644 --- a/docs/api/namespaces/YTNodes/classes/MetadataScreen.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MetadataScreen.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MetadataScreen +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MetadataScreen # Class: MetadataScreen +Defined in: [src/parser/classes/MetadataScreen.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataScreen.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MetadataScreen() +### Constructor -> **new MetadataScreen**(`data`): [`MetadataScreen`](MetadataScreen.md) +> **new MetadataScreen**(`data`): `MetadataScreen` + +Defined in: [src/parser/classes/MetadataScreen.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataScreen.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MetadataScreen`](MetadataScreen.md) +`MetadataScreen` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MetadataScreen.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataScreen.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **section\_list**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/MetadataScreen.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataScreen.ts#L7) +Defined in: [src/parser/classes/MetadataScreen.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataScreen.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MetadataScreen'` +Defined in: [src/parser/classes/MetadataScreen.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MetadataScreen.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MetadataScreen.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MetadataScreen.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MetadataScreen & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MicroformatData.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MicroformatData.md new file mode 100644 index 00000000..144a540b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MicroformatData.md @@ -0,0 +1,399 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MicroformatData + +# Class: MicroformatData + +Defined in: [src/parser/classes/MicroformatData.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MicroformatData**(`data`): `MicroformatData` + +Defined in: [src/parser/classes/MicroformatData.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L32) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MicroformatData` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### android\_package + +> **android\_package**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L14) + +*** + +### app\_name + +> **app\_name**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L13) + +*** + +### available\_countries + +> **available\_countries**: `string`[] + +Defined in: [src/parser/classes/MicroformatData.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L30) + +*** + +### description + +> **description**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L10) + +*** + +### ios\_app\_arguments + +> **ios\_app\_arguments**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L16) + +*** + +### ios\_app\_store\_id + +> **ios\_app\_store\_id**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L15) + +*** + +### is\_family\_safe + +> **is\_family\_safe**: `boolean` + +Defined in: [src/parser/classes/MicroformatData.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L28) + +*** + +### is\_unlisted + +> **is\_unlisted**: `boolean` + +Defined in: [src/parser/classes/MicroformatData.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L27) + +*** + +### noindex + +> **noindex**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L26) + +*** + +### og\_type + +> **og\_type**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L17) + +*** + +### schema\_dot\_org\_type + +> **schema\_dot\_org\_type**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L25) + +*** + +### site\_name + +> **site\_name**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L12) + +*** + +### tags + +> **tags**: `string`[] + +Defined in: [src/parser/classes/MicroformatData.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L29) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/MicroformatData.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L11) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L9) + +*** + +### twitter\_card\_type + +> **twitter\_card\_type**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L23) + +*** + +### twitter\_site\_handle + +> **twitter\_site\_handle**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L24) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### url\_applinks\_android + +> **url\_applinks\_android**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L20) + +*** + +### url\_applinks\_ios + +> **url\_applinks\_ios**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L19) + +*** + +### url\_applinks\_web + +> **url\_applinks\_web**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L18) + +*** + +### url\_canonical + +> **url\_canonical**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L8) + +*** + +### url\_twitter\_android + +> **url\_twitter\_android**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L22) + +*** + +### url\_twitter\_ios + +> **url\_twitter\_ios**: `string` + +Defined in: [src/parser/classes/MicroformatData.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L21) + +*** + +### type + +> `static` **type**: `string` = `'MicroformatData'` + +Defined in: [src/parser/classes/MicroformatData.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MicroformatData.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MicroformatData & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MicroformatData & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Mix.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Mix.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/Mix.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Mix.md index 3182594d..11e4dc2e 100644 --- a/docs/api/namespaces/YTNodes/classes/Mix.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Mix.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Mix +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Mix # Class: Mix +Defined in: [src/parser/classes/Mix.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Mix.ts#L4) + ## Extends - [`Playlist`](Playlist.md) ## Constructors -### new Mix() +### Constructor -> **new Mix**(`data`): [`Mix`](Mix.md) +> **new Mix**(`data`): `Mix` + +Defined in: [src/parser/classes/Mix.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Mix.ts#L7) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Mix`](Mix.md) +`Mix` #### Overrides -[`Playlist`](Playlist.md).[`constructor`](Playlist.md#constructors) - -#### Defined in - -[src/parser/classes/Mix.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Mix.ts#L7) +[`Playlist`](Playlist.md).[`constructor`](Playlist.md#constructor) ## Properties @@ -34,241 +36,217 @@ > **author**: [`Text`](../../Misc/classes/Text.md) \| [`Author`](../../Misc/classes/Author.md) +Defined in: [src/parser/classes/Playlist.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L15) + #### Inherited from [`Playlist`](Playlist.md).[`author`](Playlist.md#author) -#### Defined in - -[src/parser/classes/Playlist.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L15) - *** ### badges > **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L23) + #### Inherited from [`Playlist`](Playlist.md).[`badges`](Playlist.md#badges) -#### Defined in - -[src/parser/classes/Playlist.ts:23](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L23) - *** ### endpoint > **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) +Defined in: [src/parser/classes/Playlist.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L24) + #### Inherited from [`Playlist`](Playlist.md).[`endpoint`](Playlist.md#endpoint) -#### Defined in - -[src/parser/classes/Playlist.ts:24](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L24) - *** ### first\_videos > **first\_videos**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L20) + #### Inherited from [`Playlist`](Playlist.md).[`first_videos`](Playlist.md#first_videos) -#### Defined in - -[src/parser/classes/Playlist.ts:20](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L20) - *** ### id > **id**: `string` +Defined in: [src/parser/classes/Playlist.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L13) + #### Inherited from [`Playlist`](Playlist.md).[`id`](Playlist.md#id) -#### Defined in - -[src/parser/classes/Playlist.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L13) - *** ### menu > **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) +Defined in: [src/parser/classes/Playlist.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L22) + #### Inherited from [`Playlist`](Playlist.md).[`menu`](Playlist.md#menu) -#### Defined in - -[src/parser/classes/Playlist.ts:22](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L22) - *** ### share\_url -> **share\_url**: `null` \| `string` +> **share\_url**: `string` \| `null` + +Defined in: [src/parser/classes/Playlist.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L21) #### Inherited from [`Playlist`](Playlist.md).[`share_url`](Playlist.md#share_url) -#### Defined in - -[src/parser/classes/Playlist.ts:21](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L21) - *** ### thumbnail\_overlays > **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +Defined in: [src/parser/classes/Playlist.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L25) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnail_overlays`](Playlist.md#thumbnail_overlays) -#### Defined in - -[src/parser/classes/Playlist.ts:25](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L25) - *** ### thumbnail\_renderer? > `optional` **thumbnail\_renderer**: [`PlaylistCustomThumbnail`](PlaylistCustomThumbnail.md) \| [`PlaylistVideoThumbnail`](PlaylistVideoThumbnail.md) +Defined in: [src/parser/classes/Playlist.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L17) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnail_renderer`](Playlist.md#thumbnail_renderer) -#### Defined in - -[src/parser/classes/Playlist.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L17) - *** ### thumbnails > **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] +Defined in: [src/parser/classes/Playlist.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L16) + #### Inherited from [`Playlist`](Playlist.md).[`thumbnails`](Playlist.md#thumbnails) -#### Defined in - -[src/parser/classes/Playlist.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L16) - *** ### title > **title**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L14) + #### Inherited from [`Playlist`](Playlist.md).[`title`](Playlist.md#title) -#### Defined in - -[src/parser/classes/Playlist.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L14) - *** ### type > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`Playlist`](Playlist.md).[`type`](Playlist.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### video\_count > **video\_count**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L18) + #### Inherited from [`Playlist`](Playlist.md).[`video_count`](Playlist.md#video_count) -#### Defined in - -[src/parser/classes/Playlist.ts:18](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L18) - *** ### video\_count\_short > **video\_count\_short**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L19) + #### Inherited from [`Playlist`](Playlist.md).[`video_count_short`](Playlist.md#video_count_short) -#### Defined in - -[src/parser/classes/Playlist.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L19) - *** ### view\_playlist? > `optional` **view\_playlist**: [`Text`](../../Misc/classes/Text.md) +Defined in: [src/parser/classes/Playlist.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L26) + #### Inherited from [`Playlist`](Playlist.md).[`view_playlist`](Playlist.md#view_playlist) -#### Defined in - -[src/parser/classes/Playlist.ts:26](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Playlist.ts#L26) - *** ### type > `static` **type**: `string` = `'Mix'` +Defined in: [src/parser/classes/Mix.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Mix.ts#L5) + #### Overrides [`Playlist`](Playlist.md).[`type`](Playlist.md#type-1) -#### Defined in - -[src/parser/classes/Mix.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Mix.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -286,27 +264,31 @@ If the node is not of the given type [`Playlist`](Playlist.md).[`as`](Playlist.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Mix & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -320,27 +302,31 @@ Whether the node has the key [`Playlist`](Playlist.md).[`hasKey`](Playlist.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -354,27 +340,31 @@ whether the node is of the given type [`Playlist`](Playlist.md).[`is`](Playlist.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -391,7 +381,3 @@ If the node does not have the key #### Inherited from [`Playlist`](Playlist.md).[`key`](Playlist.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MobileTopbar.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MobileTopbar.md new file mode 100644 index 00000000..b4aff123 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MobileTopbar.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MobileTopbar + +# Class: MobileTopbar + +Defined in: [src/parser/classes/mweb/MobileTopbar.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MobileTopbar.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MobileTopbar**(`data`): `MobileTopbar` + +Defined in: [src/parser/classes/mweb/MobileTopbar.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MobileTopbar.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MobileTopbar` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### buttons + +> **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/mweb/MobileTopbar.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MobileTopbar.ts#L10) + +*** + +### logo\_type? + +> `optional` **logo\_type**: `string` + +Defined in: [src/parser/classes/mweb/MobileTopbar.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MobileTopbar.ts#L11) + +*** + +### placeholder\_text + +> **placeholder\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/mweb/MobileTopbar.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MobileTopbar.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MobileTopbar'` + +Defined in: [src/parser/classes/mweb/MobileTopbar.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MobileTopbar.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MobileTopbar & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MobileTopbar & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ModalWithTitleAndButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ModalWithTitleAndButton.md new file mode 100644 index 00000000..99b56d4f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ModalWithTitleAndButton.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ModalWithTitleAndButton + +# Class: ModalWithTitleAndButton + +Defined in: [src/parser/classes/ModalWithTitleAndButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ModalWithTitleAndButton.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ModalWithTitleAndButton**(`data`): `ModalWithTitleAndButton` + +Defined in: [src/parser/classes/ModalWithTitleAndButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ModalWithTitleAndButton.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ModalWithTitleAndButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button + +> **button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ModalWithTitleAndButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ModalWithTitleAndButton.ts#L11) + +*** + +### content + +> **content**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ModalWithTitleAndButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ModalWithTitleAndButton.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ModalWithTitleAndButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ModalWithTitleAndButton.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ModalWithTitleAndButton'` + +Defined in: [src/parser/classes/ModalWithTitleAndButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ModalWithTitleAndButton.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ModalWithTitleAndButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ModalWithTitleAndButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ModifyChannelNotificationPreferenceEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ModifyChannelNotificationPreferenceEndpoint.md new file mode 100644 index 00000000..c5617840 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ModifyChannelNotificationPreferenceEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ModifyChannelNotificationPreferenceEndpoint + +# Class: ModifyChannelNotificationPreferenceEndpoint + +Defined in: [src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`ModifyChannelNotificationPreferenceRequest`](../../../../type-aliases/ModifyChannelNotificationPreferenceRequest.md)\> + +## Constructors + +### Constructor + +> **new ModifyChannelNotificationPreferenceEndpoint**(`data`): `ModifyChannelNotificationPreferenceEndpoint` + +Defined in: [src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ModifyChannelNotificationPreferenceEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ModifyChannelNotificationPreferenceEndpoint'` + +Defined in: [src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`ModifyChannelNotificationPreferenceRequest`](../../../../type-aliases/ModifyChannelNotificationPreferenceRequest.md) + +Defined in: [src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts#L20) + +#### Returns + +[`ModifyChannelNotificationPreferenceRequest`](../../../../type-aliases/ModifyChannelNotificationPreferenceRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ModifyChannelNotificationPreferenceEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ModifyChannelNotificationPreferenceEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ModifyChannelNotificationPreferenceEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Movie.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Movie.md new file mode 100644 index 00000000..3795c58a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Movie.md @@ -0,0 +1,327 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Movie + +# Class: Movie + +Defined in: [src/parser/classes/Movie.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Movie**(`data`): `Movie` + +Defined in: [src/parser/classes/Movie.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L32) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Movie` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/Movie.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L19) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Movie.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L27) + +*** + +### description\_snippet? + +> `optional` **description\_snippet**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Movie.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L15) + +*** + +### duration + +> **duration**: `object` + +Defined in: [src/parser/classes/Movie.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L21) + +#### seconds + +> **seconds**: `number` + +#### text + +> **text**: `string` + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Movie.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L26) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/Movie.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L13) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/Movie.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L30) + +*** + +### show\_action\_menu + +> **show\_action\_menu**: `boolean` + +Defined in: [src/parser/classes/Movie.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L29) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Movie.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L18) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/Movie.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L17) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Movie.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L14) + +*** + +### top\_metadata\_items + +> **top\_metadata\_items**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Movie.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### use\_vertical\_poster + +> **use\_vertical\_poster**: `boolean` + +Defined in: [src/parser/classes/Movie.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L28) + +*** + +### type + +> `static` **type**: `string` = `'Movie'` + +Defined in: [src/parser/classes/Movie.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Movie.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Movie & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Movie & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MovingThumbnail.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MovingThumbnail.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/MovingThumbnail.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MovingThumbnail.md index b2c779cd..d5db9dea 100644 --- a/docs/api/namespaces/YTNodes/classes/MovingThumbnail.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MovingThumbnail.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MovingThumbnail +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MovingThumbnail # Class: MovingThumbnail +Defined in: [src/parser/classes/MovingThumbnail.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MovingThumbnail.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MovingThumbnail() +### Constructor -> **new MovingThumbnail**(`data`): [`MovingThumbnail`](MovingThumbnail.md) +> **new MovingThumbnail**(`data`): `MovingThumbnail` + +Defined in: [src/parser/classes/MovingThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MovingThumbnail.ts#L8) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MovingThumbnail`](MovingThumbnail.md) +`MovingThumbnail` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MovingThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MovingThumbnail.ts#L8) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,45 +36,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MovingThumbnail'` +Defined in: [src/parser/classes/MovingThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MovingThumbnail.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MovingThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MovingThumbnail.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -90,27 +96,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MovingThumbnail & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -124,27 +134,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -158,27 +172,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -195,7 +213,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/MultiMarkersPlayerBar.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiMarkersPlayerBar.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/MultiMarkersPlayerBar.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MultiMarkersPlayerBar.md index 35257134..79b17e56 100644 --- a/docs/api/namespaces/YTNodes/classes/MultiMarkersPlayerBar.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiMarkersPlayerBar.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MultiMarkersPlayerBar +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MultiMarkersPlayerBar # Class: MultiMarkersPlayerBar +Defined in: [src/parser/classes/MultiMarkersPlayerBar.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MultiMarkersPlayerBar.ts#L34) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MultiMarkersPlayerBar() +### Constructor -> **new MultiMarkersPlayerBar**(`data`): [`MultiMarkersPlayerBar`](MultiMarkersPlayerBar.md) +> **new MultiMarkersPlayerBar**(`data`): `MultiMarkersPlayerBar` + +Defined in: [src/parser/classes/MultiMarkersPlayerBar.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MultiMarkersPlayerBar.ts#L39) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MultiMarkersPlayerBar`](MultiMarkersPlayerBar.md) +`MultiMarkersPlayerBar` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MultiMarkersPlayerBar.ts:39](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MultiMarkersPlayerBar.ts#L39) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **markers\_map**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<`Marker`\> -#### Defined in - -[src/parser/classes/MultiMarkersPlayerBar.ts:37](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MultiMarkersPlayerBar.ts#L37) +Defined in: [src/parser/classes/MultiMarkersPlayerBar.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MultiMarkersPlayerBar.ts#L37) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MultiMarkersPlayerBar'` +Defined in: [src/parser/classes/MultiMarkersPlayerBar.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MultiMarkersPlayerBar.ts#L35) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MultiMarkersPlayerBar.ts:35](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MultiMarkersPlayerBar.ts#L35) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MultiMarkersPlayerBar & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenu.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenu.md new file mode 100644 index 00000000..8a2b73bd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenu.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MultiPageMenu + +# Class: MultiPageMenu + +Defined in: [src/parser/classes/menus/MultiPageMenu.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenu.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MultiPageMenu**(`data`): `MultiPageMenu` + +Defined in: [src/parser/classes/menus/MultiPageMenu.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenu.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MultiPageMenu` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### header + +> **header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/menus/MultiPageMenu.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenu.ts#L9) + +*** + +### sections + +> **sections**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/menus/MultiPageMenu.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenu.ts#L10) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/menus/MultiPageMenu.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenu.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MultiPageMenu'` + +Defined in: [src/parser/classes/menus/MultiPageMenu.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenu.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MultiPageMenu & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MultiPageMenu & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenuNotificationSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenuNotificationSection.md new file mode 100644 index 00000000..935701b4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenuNotificationSection.md @@ -0,0 +1,245 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MultiPageMenuNotificationSection + +# Class: MultiPageMenuNotificationSection + +Defined in: [src/parser/classes/menus/MultiPageMenuNotificationSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenuNotificationSection.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MultiPageMenuNotificationSection**(`data`): `MultiPageMenuNotificationSection` + +Defined in: [src/parser/classes/menus/MultiPageMenuNotificationSection.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenuNotificationSection.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MultiPageMenuNotificationSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ContinuationItem`](ContinuationItem.md) \| [`Message`](Message.md) \| [`Notification`](Notification.md)\> + +Defined in: [src/parser/classes/menus/MultiPageMenuNotificationSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenuNotificationSection.ts#L12) + +*** + +### notification\_section\_title? + +> `optional` **notification\_section\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/menus/MultiPageMenuNotificationSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenuNotificationSection.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MultiPageMenuNotificationSection'` + +Defined in: [src/parser/classes/menus/MultiPageMenuNotificationSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenuNotificationSection.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ContinuationItem`](ContinuationItem.md) \| [`Message`](Message.md) \| [`Notification`](Notification.md)\> + +Defined in: [src/parser/classes/menus/MultiPageMenuNotificationSection.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MultiPageMenuNotificationSection.ts#L25) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ContinuationItem`](ContinuationItem.md) \| [`Message`](Message.md) \| [`Notification`](Notification.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MultiPageMenuNotificationSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MultiPageMenuNotificationSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MultiPageMenuSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenuSection.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/MultiPageMenuSection.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenuSection.md index a8d3b5ed..38cc8596 100644 --- a/docs/api/namespaces/YTNodes/classes/MultiPageMenuSection.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MultiPageMenuSection.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MultiPageMenuSection +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MultiPageMenuSection # Class: MultiPageMenuSection +Defined in: [src/parser/classes/mweb/MultiPageMenuSection.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MultiPageMenuSection.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MultiPageMenuSection() +### Constructor -> **new MultiPageMenuSection**(`data`): [`MultiPageMenuSection`](MultiPageMenuSection.md) +> **new MultiPageMenuSection**(`data`): `MultiPageMenuSection` + +Defined in: [src/parser/classes/mweb/MultiPageMenuSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MultiPageMenuSection.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MultiPageMenuSection`](MultiPageMenuSection.md) +`MultiPageMenuSection` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/mweb/MultiPageMenuSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/mweb/MultiPageMenuSection.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/mweb/MultiPageMenuSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/mweb/MultiPageMenuSection.ts#L8) +Defined in: [src/parser/classes/mweb/MultiPageMenuSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MultiPageMenuSection.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MultiPageMenuSection'` +Defined in: [src/parser/classes/mweb/MultiPageMenuSection.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/MultiPageMenuSection.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/mweb/MultiPageMenuSection.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/mweb/MultiPageMenuSection.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MultiPageMenuSection & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCardShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCardShelf.md new file mode 100644 index 00000000..139b0765 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCardShelf.md @@ -0,0 +1,303 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicCardShelf + +# Class: MusicCardShelf + +Defined in: [src/parser/classes/MusicCardShelf.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L12) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicCardShelf**(`data`): `MusicCardShelf` + +Defined in: [src/parser/classes/MusicCardShelf.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L27) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicCardShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### buttons + +> **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md)\> + +Defined in: [src/parser/classes/MusicCardShelf.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L18) + +*** + +### contents? + +> `optional` **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/MusicCardShelf.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L25) + +*** + +### end\_icon\_type? + +> `optional` **end\_icon\_type**: `string` + +Defined in: [src/parser/classes/MusicCardShelf.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L22) + +*** + +### header + +> **header**: [`MusicCardShelfHeaderBasic`](MusicCardShelfHeaderBasic.md) \| `null` + +Defined in: [src/parser/classes/MusicCardShelf.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L21) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/MusicCardShelf.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L19) + +*** + +### on\_tap + +> **on\_tap**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicCardShelf.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L20) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicCardShelf.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L17) + +*** + +### subtitle\_badges + +> **subtitle\_badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicInlineBadge`](MusicInlineBadge.md)\> + +Defined in: [src/parser/classes/MusicCardShelf.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L23) + +*** + +### thumbnail + +> **thumbnail**: [`MusicThumbnail`](MusicThumbnail.md) \| `null` + +Defined in: [src/parser/classes/MusicCardShelf.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L15) + +*** + +### thumbnail\_overlay + +> **thumbnail\_overlay**: [`MusicItemThumbnailOverlay`](MusicItemThumbnailOverlay.md) \| `null` + +Defined in: [src/parser/classes/MusicCardShelf.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L24) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicCardShelf.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicCardShelf'` + +Defined in: [src/parser/classes/MusicCardShelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelf.ts#L13) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicCardShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicCardShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MusicCardShelfHeaderBasic.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCardShelfHeaderBasic.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/MusicCardShelfHeaderBasic.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCardShelfHeaderBasic.md index b9ab99e1..6552d9f7 100644 --- a/docs/api/namespaces/YTNodes/classes/MusicCardShelfHeaderBasic.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCardShelfHeaderBasic.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MusicCardShelfHeaderBasic +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicCardShelfHeaderBasic # Class: MusicCardShelfHeaderBasic +Defined in: [src/parser/classes/MusicCardShelfHeaderBasic.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelfHeaderBasic.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MusicCardShelfHeaderBasic() +### Constructor -> **new MusicCardShelfHeaderBasic**(`data`): [`MusicCardShelfHeaderBasic`](MusicCardShelfHeaderBasic.md) +> **new MusicCardShelfHeaderBasic**(`data`): `MusicCardShelfHeaderBasic` + +Defined in: [src/parser/classes/MusicCardShelfHeaderBasic.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelfHeaderBasic.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MusicCardShelfHeaderBasic`](MusicCardShelfHeaderBasic.md) +`MusicCardShelfHeaderBasic` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MusicCardShelfHeaderBasic.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicCardShelfHeaderBasic.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/MusicCardShelfHeaderBasic.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicCardShelfHeaderBasic.ts#L8) +Defined in: [src/parser/classes/MusicCardShelfHeaderBasic.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelfHeaderBasic.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MusicCardShelfHeaderBasic'` +Defined in: [src/parser/classes/MusicCardShelfHeaderBasic.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCardShelfHeaderBasic.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MusicCardShelfHeaderBasic.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicCardShelfHeaderBasic.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MusicCardShelfHeaderBasic & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCarouselShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCarouselShelf.md new file mode 100644 index 00000000..0c9f26ce --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCarouselShelf.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicCarouselShelf + +# Class: MusicCarouselShelf + +Defined in: [src/parser/classes/MusicCarouselShelf.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelf.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicCarouselShelf**(`data`): `MusicCarouselShelf` + +Defined in: [src/parser/classes/MusicCarouselShelf.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelf.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicCarouselShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicMultiRowListItem`](MusicMultiRowListItem.md) \| [`MusicNavigationButton`](MusicNavigationButton.md) \| [`MusicResponsiveListItem`](MusicResponsiveListItem.md) \| [`MusicTwoRowItem`](MusicTwoRowItem.md)\> + +Defined in: [src/parser/classes/MusicCarouselShelf.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelf.ts#L14) + +*** + +### header + +> **header**: [`MusicCarouselShelfBasicHeader`](MusicCarouselShelfBasicHeader.md) \| `null` + +Defined in: [src/parser/classes/MusicCarouselShelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelf.ts#L13) + +*** + +### num\_items\_per\_column? + +> `optional` **num\_items\_per\_column**: `number` + +Defined in: [src/parser/classes/MusicCarouselShelf.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelf.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicCarouselShelf'` + +Defined in: [src/parser/classes/MusicCarouselShelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelf.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicCarouselShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicCarouselShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCarouselShelfBasicHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCarouselShelfBasicHeader.md new file mode 100644 index 00000000..1d4b350f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicCarouselShelfBasicHeader.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicCarouselShelfBasicHeader + +# Class: MusicCarouselShelfBasicHeader + +Defined in: [src/parser/classes/MusicCarouselShelfBasicHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelfBasicHeader.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicCarouselShelfBasicHeader**(`data`): `MusicCarouselShelfBasicHeader` + +Defined in: [src/parser/classes/MusicCarouselShelfBasicHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelfBasicHeader.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicCarouselShelfBasicHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### end\_icons? + +> `optional` **end\_icons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`IconLink`](IconLink.md)\> + +Defined in: [src/parser/classes/MusicCarouselShelfBasicHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelfBasicHeader.ts#L15) + +*** + +### more\_content? + +> `optional` **more\_content**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/MusicCarouselShelfBasicHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelfBasicHeader.ts#L14) + +*** + +### strapline? + +> `optional` **strapline**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicCarouselShelfBasicHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelfBasicHeader.ts#L12) + +*** + +### thumbnail? + +> `optional` **thumbnail**: [`MusicThumbnail`](MusicThumbnail.md) \| `null` + +Defined in: [src/parser/classes/MusicCarouselShelfBasicHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelfBasicHeader.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicCarouselShelfBasicHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelfBasicHeader.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicCarouselShelfBasicHeader'` + +Defined in: [src/parser/classes/MusicCarouselShelfBasicHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicCarouselShelfBasicHeader.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicCarouselShelfBasicHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicCarouselShelfBasicHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDescriptionShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDescriptionShelf.md new file mode 100644 index 00000000..cdb6d5cf --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDescriptionShelf.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicDescriptionShelf + +# Class: MusicDescriptionShelf + +Defined in: [src/parser/classes/MusicDescriptionShelf.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDescriptionShelf.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicDescriptionShelf**(`data`): `MusicDescriptionShelf` + +Defined in: [src/parser/classes/MusicDescriptionShelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDescriptionShelf.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicDescriptionShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicDescriptionShelf.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDescriptionShelf.ts#L8) + +*** + +### footer + +> **footer**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicDescriptionShelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDescriptionShelf.ts#L11) + +*** + +### max\_collapsed\_lines? + +> `optional` **max\_collapsed\_lines**: `string` + +Defined in: [src/parser/classes/MusicDescriptionShelf.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDescriptionShelf.ts#L9) + +*** + +### max\_expanded\_lines? + +> `optional` **max\_expanded\_lines**: `string` + +Defined in: [src/parser/classes/MusicDescriptionShelf.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDescriptionShelf.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicDescriptionShelf'` + +Defined in: [src/parser/classes/MusicDescriptionShelf.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDescriptionShelf.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicDescriptionShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicDescriptionShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDetailHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDetailHeader.md new file mode 100644 index 00000000..658a02bf --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDetailHeader.md @@ -0,0 +1,315 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicDetailHeader + +# Class: MusicDetailHeader + +Defined in: [src/parser/classes/MusicDetailHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicDetailHeader**(`data`): `MusicDetailHeader` + +Defined in: [src/parser/classes/MusicDetailHeader.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L27) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicDetailHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author? + +> `optional` **author**: `object` + +Defined in: [src/parser/classes/MusicDetailHeader.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L20) + +#### channel\_id + +> **channel\_id**: `string` \| `undefined` + +#### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) \| `undefined` + +#### name + +> **name**: `string` + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/MusicDetailHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L19) + +*** + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicDetailHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L12) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/MusicDetailHeader.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L25) + +*** + +### second\_subtitle + +> **second\_subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicDetailHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L14) + +*** + +### song\_count + +> **song\_count**: `string` + +Defined in: [src/parser/classes/MusicDetailHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L16) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicDetailHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L13) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/MusicDetailHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L18) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicDetailHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L11) + +*** + +### total\_duration + +> **total\_duration**: `string` + +Defined in: [src/parser/classes/MusicDetailHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L17) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### year + +> **year**: `string` + +Defined in: [src/parser/classes/MusicDetailHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L15) + +*** + +### type + +> `static` **type**: `string` = `'MusicDetailHeader'` + +Defined in: [src/parser/classes/MusicDetailHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDetailHeader.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicDetailHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicDetailHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDownloadStateBadge.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDownloadStateBadge.md new file mode 100644 index 00000000..16520559 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicDownloadStateBadge.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicDownloadStateBadge + +# Class: MusicDownloadStateBadge + +Defined in: [src/parser/classes/MusicDownloadStateBadge.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDownloadStateBadge.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicDownloadStateBadge**(`data`): `MusicDownloadStateBadge` + +Defined in: [src/parser/classes/MusicDownloadStateBadge.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDownloadStateBadge.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicDownloadStateBadge` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### playlist\_id + +> **playlist\_id**: `string` + +Defined in: [src/parser/classes/MusicDownloadStateBadge.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDownloadStateBadge.ts#L7) + +*** + +### supported\_download\_states + +> **supported\_download\_states**: `string`[] + +Defined in: [src/parser/classes/MusicDownloadStateBadge.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDownloadStateBadge.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicDownloadStateBadge'` + +Defined in: [src/parser/classes/MusicDownloadStateBadge.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicDownloadStateBadge.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicDownloadStateBadge & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicDownloadStateBadge & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicEditablePlaylistDetailHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicEditablePlaylistDetailHeader.md new file mode 100644 index 00000000..203fddee --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicEditablePlaylistDetailHeader.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicEditablePlaylistDetailHeader + +# Class: MusicEditablePlaylistDetailHeader + +Defined in: [src/parser/classes/MusicEditablePlaylistDetailHeader.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicEditablePlaylistDetailHeader.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicEditablePlaylistDetailHeader**(`data`): `MusicEditablePlaylistDetailHeader` + +Defined in: [src/parser/classes/MusicEditablePlaylistDetailHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicEditablePlaylistDetailHeader.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicEditablePlaylistDetailHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### edit\_header + +> **edit\_header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/MusicEditablePlaylistDetailHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicEditablePlaylistDetailHeader.ts#L8) + +*** + +### header + +> **header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/MusicEditablePlaylistDetailHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicEditablePlaylistDetailHeader.ts#L7) + +*** + +### playlist\_id + +> **playlist\_id**: `string` + +Defined in: [src/parser/classes/MusicEditablePlaylistDetailHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicEditablePlaylistDetailHeader.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicEditablePlaylistDetailHeader'` + +Defined in: [src/parser/classes/MusicEditablePlaylistDetailHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicEditablePlaylistDetailHeader.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicEditablePlaylistDetailHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicEditablePlaylistDetailHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicElementHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicElementHeader.md new file mode 100644 index 00000000..222d164d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicElementHeader.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicElementHeader + +# Class: MusicElementHeader + +Defined in: [src/parser/classes/MusicElementHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicElementHeader.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicElementHeader**(`data`): `MusicElementHeader` + +Defined in: [src/parser/classes/MusicElementHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicElementHeader.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicElementHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### element + +> **element**: [`Element`](Element.md) \| `null` + +Defined in: [src/parser/classes/MusicElementHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicElementHeader.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicElementHeader'` + +Defined in: [src/parser/classes/MusicElementHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicElementHeader.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicElementHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicElementHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MusicHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicHeader.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/MusicHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MusicHeader.md index f8b4afba..59657734 100644 --- a/docs/api/namespaces/YTNodes/classes/MusicHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MusicHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicHeader # Class: MusicHeader +Defined in: [src/parser/classes/MusicHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MusicHeader() +### Constructor -> **new MusicHeader**(`data`): [`MusicHeader`](MusicHeader.md) +> **new MusicHeader**(`data`): `MusicHeader` + +Defined in: [src/parser/classes/MusicHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicHeader.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MusicHeader`](MusicHeader.md) +`MusicHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MusicHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicHeader.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > `optional` **header**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/MusicHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicHeader.ts#L8) +Defined in: [src/parser/classes/MusicHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicHeader.ts#L8) *** @@ -44,9 +44,7 @@ > `optional` **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/MusicHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicHeader.ts#L9) +Defined in: [src/parser/classes/MusicHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicHeader.ts#L9) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MusicHeader'` +Defined in: [src/parser/classes/MusicHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MusicHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MusicHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicImmersiveHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicImmersiveHeader.md new file mode 100644 index 00000000..cd345369 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicImmersiveHeader.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicImmersiveHeader + +# Class: MusicImmersiveHeader + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L13) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicImmersiveHeader**(`data`): `MusicImmersiveHeader` + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicImmersiveHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L23) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L17) + +*** + +### more\_button + +> **more\_button**: [`ToggleButton`](ToggleButton.md) \| `null` + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L18) + +*** + +### play\_button + +> **play\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L19) + +*** + +### share\_endpoint? + +> `optional` **share\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L20) + +*** + +### start\_radio\_button + +> **start\_radio\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L21) + +*** + +### subscription\_button + +> **subscription\_button**: [`SubscribeButton`](SubscribeButton.md) \| `null` + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L22) + +*** + +### thumbnail + +> **thumbnail**: [`MusicThumbnail`](MusicThumbnail.md) \| `null` + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L24) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicImmersiveHeader'` + +Defined in: [src/parser/classes/MusicImmersiveHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicImmersiveHeader.ts#L14) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicImmersiveHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicImmersiveHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicInlineBadge.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicInlineBadge.md new file mode 100644 index 00000000..fe693842 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicInlineBadge.md @@ -0,0 +1,245 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicInlineBadge + +# Class: MusicInlineBadge + +Defined in: [src/parser/classes/MusicInlineBadge.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicInlineBadge.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicInlineBadge**(`data`): `MusicInlineBadge` + +Defined in: [src/parser/classes/MusicInlineBadge.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicInlineBadge.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicInlineBadge` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/MusicInlineBadge.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicInlineBadge.ts#L9) + +*** + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/MusicInlineBadge.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicInlineBadge.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicInlineBadge'` + +Defined in: [src/parser/classes/MusicInlineBadge.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicInlineBadge.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### label + +#### Get Signature + +> **get** **label**(): `string` \| `undefined` + +Defined in: [src/parser/classes/MusicInlineBadge.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicInlineBadge.ts#L23) + +##### Returns + +`string` \| `undefined` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicInlineBadge & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicInlineBadge & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicItemThumbnailOverlay.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicItemThumbnailOverlay.md new file mode 100644 index 00000000..7f738dfb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicItemThumbnailOverlay.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicItemThumbnailOverlay + +# Class: MusicItemThumbnailOverlay + +Defined in: [src/parser/classes/MusicItemThumbnailOverlay.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicItemThumbnailOverlay.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicItemThumbnailOverlay**(`data`): `MusicItemThumbnailOverlay` + +Defined in: [src/parser/classes/MusicItemThumbnailOverlay.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicItemThumbnailOverlay.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicItemThumbnailOverlay` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`MusicPlayButton`](MusicPlayButton.md) \| `null` + +Defined in: [src/parser/classes/MusicItemThumbnailOverlay.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicItemThumbnailOverlay.ts#L8) + +*** + +### content\_position + +> **content\_position**: `string` + +Defined in: [src/parser/classes/MusicItemThumbnailOverlay.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicItemThumbnailOverlay.ts#L9) + +*** + +### display\_style + +> **display\_style**: `string` + +Defined in: [src/parser/classes/MusicItemThumbnailOverlay.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicItemThumbnailOverlay.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicItemThumbnailOverlay'` + +Defined in: [src/parser/classes/MusicItemThumbnailOverlay.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicItemThumbnailOverlay.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicItemThumbnailOverlay & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicItemThumbnailOverlay & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicLargeCardItemCarousel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicLargeCardItemCarousel.md new file mode 100644 index 00000000..3f4d771a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicLargeCardItemCarousel.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicLargeCardItemCarousel + +# Class: MusicLargeCardItemCarousel + +Defined in: [src/parser/classes/MusicLargeCardItemCarousel.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicLargeCardItemCarousel.ts#L43) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicLargeCardItemCarousel**(`data`): `MusicLargeCardItemCarousel` + +Defined in: [src/parser/classes/MusicLargeCardItemCarousel.ts:49](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicLargeCardItemCarousel.ts#L49) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicLargeCardItemCarousel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### header + +> **header**: `any` + +Defined in: [src/parser/classes/MusicLargeCardItemCarousel.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicLargeCardItemCarousel.ts#L47) + +*** + +### panels + +> **panels**: `Panel`[] + +Defined in: [src/parser/classes/MusicLargeCardItemCarousel.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicLargeCardItemCarousel.ts#L46) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicLargeCardItemCarousel'` + +Defined in: [src/parser/classes/MusicLargeCardItemCarousel.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicLargeCardItemCarousel.ts#L44) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicLargeCardItemCarousel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicLargeCardItemCarousel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MusicMenuItemDivider.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMenuItemDivider.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/MusicMenuItemDivider.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMenuItemDivider.md index e623cdf0..2ffe4c68 100644 --- a/docs/api/namespaces/YTNodes/classes/MusicMenuItemDivider.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMenuItemDivider.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MusicMenuItemDivider +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicMenuItemDivider # Class: MusicMenuItemDivider +Defined in: [src/parser/classes/menus/MusicMenuItemDivider.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMenuItemDivider.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MusicMenuItemDivider() +### Constructor -> **new MusicMenuItemDivider**(`_data`): [`MusicMenuItemDivider`](MusicMenuItemDivider.md) +> **new MusicMenuItemDivider**(`_data`): `MusicMenuItemDivider` + +Defined in: [src/parser/classes/menus/MusicMenuItemDivider.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMenuItemDivider.ts#L8) #### Parameters -• **\_data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### \_data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MusicMenuItemDivider`](MusicMenuItemDivider.md) +`MusicMenuItemDivider` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/menus/MusicMenuItemDivider.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MusicMenuItemDivider.ts#L8) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,45 +36,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MusicMenuItemDivider'` +Defined in: [src/parser/classes/menus/MusicMenuItemDivider.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMenuItemDivider.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/menus/MusicMenuItemDivider.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MusicMenuItemDivider.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -90,27 +96,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MusicMenuItemDivider & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -124,27 +134,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -158,27 +172,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -195,7 +213,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiRowListItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiRowListItem.md new file mode 100644 index 00000000..34100cb5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiRowListItem.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicMultiRowListItem + +# Class: MusicMultiRowListItem + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicMultiRowListItem**(`data`): `MusicMultiRowListItem` + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicMultiRowListItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description? + +> `optional` **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L20) + +*** + +### display\_style? + +> `optional` **display\_style**: `string` + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L21) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L16) + +*** + +### on\_tap + +> **on\_tap**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L15) + +*** + +### overlay + +> **overlay**: [`MusicItemThumbnailOverlay`](MusicItemThumbnailOverlay.md) \| `null` + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L14) + +*** + +### second\_title? + +> `optional` **second\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L19) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L17) + +*** + +### thumbnail + +> **thumbnail**: [`MusicThumbnail`](MusicThumbnail.md) \| `null` + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicMultiRowListItem'` + +Defined in: [src/parser/classes/MusicMultiRowListItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicMultiRowListItem.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicMultiRowListItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicMultiRowListItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MusicMultiSelectMenu.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiSelectMenu.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/MusicMultiSelectMenu.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiSelectMenu.md index 264b5933..c1889101 100644 --- a/docs/api/namespaces/YTNodes/classes/MusicMultiSelectMenu.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiSelectMenu.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MusicMultiSelectMenu +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicMultiSelectMenu # Class: MusicMultiSelectMenu +Defined in: [src/parser/classes/menus/MusicMultiSelectMenu.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenu.ts#L9) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MusicMultiSelectMenu() +### Constructor -> **new MusicMultiSelectMenu**(`data`): [`MusicMultiSelectMenu`](MusicMultiSelectMenu.md) +> **new MusicMultiSelectMenu**(`data`): `MusicMultiSelectMenu` + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenu.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenu.ts#L15) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MusicMultiSelectMenu`](MusicMultiSelectMenu.md) +`MusicMultiSelectMenu` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/menus/MusicMultiSelectMenu.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MusicMultiSelectMenu.ts#L15) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **options**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicMultiSelectMenuItem`](MusicMultiSelectMenuItem.md) \| [`MusicMenuItemDivider`](MusicMenuItemDivider.md)\> -#### Defined in - -[src/parser/classes/menus/MusicMultiSelectMenu.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MusicMultiSelectMenu.ts#L13) +Defined in: [src/parser/classes/menus/MusicMultiSelectMenu.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenu.ts#L13) *** @@ -44,9 +44,7 @@ > `optional` **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/menus/MusicMultiSelectMenu.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MusicMultiSelectMenu.ts#L12) +Defined in: [src/parser/classes/menus/MusicMultiSelectMenu.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenu.ts#L12) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MusicMultiSelectMenu'` +Defined in: [src/parser/classes/menus/MusicMultiSelectMenu.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenu.ts#L10) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/menus/MusicMultiSelectMenu.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/menus/MusicMultiSelectMenu.ts#L10) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MusicMultiSelectMenu & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiSelectMenuItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiSelectMenuItem.md new file mode 100644 index 00000000..67d547cb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicMultiSelectMenuItem.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicMultiSelectMenuItem + +# Class: MusicMultiSelectMenuItem + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenuItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenuItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicMultiSelectMenuItem**(`data`): `MusicMultiSelectMenuItem` + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenuItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenuItem.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicMultiSelectMenuItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenuItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenuItem.ts#L12) + +*** + +### form\_item\_entity\_key + +> **form\_item\_entity\_key**: `string` + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenuItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenuItem.ts#L10) + +*** + +### selected + +> **selected**: `boolean` + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenuItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenuItem.ts#L13) + +*** + +### selected\_icon\_type? + +> `optional` **selected\_icon\_type**: `string` + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenuItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenuItem.ts#L11) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenuItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenuItem.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicMultiSelectMenuItem'` + +Defined in: [src/parser/classes/menus/MusicMultiSelectMenuItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/MusicMultiSelectMenuItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicMultiSelectMenuItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicMultiSelectMenuItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicNavigationButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicNavigationButton.md new file mode 100644 index 00000000..fdad1e08 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicNavigationButton.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicNavigationButton + +# Class: MusicNavigationButton + +Defined in: [src/parser/classes/MusicNavigationButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicNavigationButton.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicNavigationButton**(`data`): `MusicNavigationButton` + +Defined in: [src/parser/classes/MusicNavigationButton.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicNavigationButton.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicNavigationButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button\_text + +> **button\_text**: `string` + +Defined in: [src/parser/classes/MusicNavigationButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicNavigationButton.ts#L9) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicNavigationButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicNavigationButton.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicNavigationButton'` + +Defined in: [src/parser/classes/MusicNavigationButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicNavigationButton.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicNavigationButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicNavigationButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlayButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlayButton.md new file mode 100644 index 00000000..9272a071 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlayButton.md @@ -0,0 +1,291 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicPlayButton + +# Class: MusicPlayButton + +Defined in: [src/parser/classes/MusicPlayButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicPlayButton**(`data`): `MusicPlayButton` + +Defined in: [src/parser/classes/MusicPlayButton.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicPlayButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility\_pause\_data? + +> `optional` **accessibility\_pause\_data**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/MusicPlayButton.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L14) + +*** + +### accessibility\_play\_data? + +> `optional` **accessibility\_play\_data**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/MusicPlayButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L13) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicPlayButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L9) + +*** + +### icon\_color + +> **icon\_color**: `string` + +Defined in: [src/parser/classes/MusicPlayButton.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L12) + +*** + +### pause\_icon\_type + +> **pause\_icon\_type**: `string` + +Defined in: [src/parser/classes/MusicPlayButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L11) + +*** + +### play\_icon\_type + +> **play\_icon\_type**: `string` + +Defined in: [src/parser/classes/MusicPlayButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicPlayButton'` + +Defined in: [src/parser/classes/MusicPlayButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### pause\_label + +#### Get Signature + +> **get** **pause\_label**(): `string` \| `undefined` + +Defined in: [src/parser/classes/MusicPlayButton.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L43) + +##### Returns + +`string` \| `undefined` + +*** + +### play\_label + +#### Get Signature + +> **get** **play\_label**(): `string` \| `undefined` + +Defined in: [src/parser/classes/MusicPlayButton.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlayButton.ts#L39) + +##### Returns + +`string` \| `undefined` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicPlayButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicPlayButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlaylistEditHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlaylistEditHeader.md new file mode 100644 index 00000000..323ed853 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlaylistEditHeader.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicPlaylistEditHeader + +# Class: MusicPlaylistEditHeader + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicPlaylistEditHeader**(`data`): `MusicPlaylistEditHeader` + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicPlaylistEditHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### edit\_description + +> **edit\_description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L12) + +*** + +### edit\_title + +> **edit\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L11) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L15) + +*** + +### playlist\_id + +> **playlist\_id**: `string` + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L14) + +*** + +### privacy + +> **privacy**: `string` + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L13) + +*** + +### privacy\_dropdown + +> **privacy\_dropdown**: [`Dropdown`](Dropdown.md) \| `null` + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L16) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicPlaylistEditHeader'` + +Defined in: [src/parser/classes/MusicPlaylistEditHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistEditHeader.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicPlaylistEditHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicPlaylistEditHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlaylistShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlaylistShelf.md new file mode 100644 index 00000000..93544c47 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicPlaylistShelf.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicPlaylistShelf + +# Class: MusicPlaylistShelf + +Defined in: [src/parser/classes/MusicPlaylistShelf.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistShelf.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicPlaylistShelf**(`data`): `MusicPlaylistShelf` + +Defined in: [src/parser/classes/MusicPlaylistShelf.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistShelf.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicPlaylistShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### collapsed\_item\_count + +> **collapsed\_item\_count**: `number` + +Defined in: [src/parser/classes/MusicPlaylistShelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistShelf.ts#L11) + +*** + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ContinuationItem`](ContinuationItem.md) \| [`MusicResponsiveListItem`](MusicResponsiveListItem.md)\> + +Defined in: [src/parser/classes/MusicPlaylistShelf.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistShelf.ts#L10) + +*** + +### continuation + +> **continuation**: `string` \| `null` + +Defined in: [src/parser/classes/MusicPlaylistShelf.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistShelf.ts#L12) + +*** + +### playlist\_id + +> **playlist\_id**: `string` + +Defined in: [src/parser/classes/MusicPlaylistShelf.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistShelf.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicPlaylistShelf'` + +Defined in: [src/parser/classes/MusicPlaylistShelf.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicPlaylistShelf.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicPlaylistShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicPlaylistShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MusicQueue.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicQueue.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/MusicQueue.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MusicQueue.md index 2f14cec1..8e9b6cda 100644 --- a/docs/api/namespaces/YTNodes/classes/MusicQueue.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicQueue.md @@ -1,42 +1,42 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MusicQueue +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicQueue # Class: MusicQueue +Defined in: [src/parser/classes/MusicQueue.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicQueue.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MusicQueue() +### Constructor -> **new MusicQueue**(`data`): [`MusicQueue`](MusicQueue.md) +> **new MusicQueue**(`data`): `MusicQueue` + +Defined in: [src/parser/classes/MusicQueue.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicQueue.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MusicQueue`](MusicQueue.md) +`MusicQueue` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MusicQueue.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicQueue.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties ### content -> **content**: `null` \| [`PlaylistPanel`](PlaylistPanel.md) +> **content**: [`PlaylistPanel`](PlaylistPanel.md) \| `null` -#### Defined in - -[src/parser/classes/MusicQueue.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicQueue.ts#L8) +Defined in: [src/parser/classes/MusicQueue.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicQueue.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MusicQueue'` +Defined in: [src/parser/classes/MusicQueue.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicQueue.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MusicQueue.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicQueue.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MusicQueue & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveHeader.md new file mode 100644 index 00000000..0295642b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveHeader.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicResponsiveHeader + +# Class: MusicResponsiveHeader + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L15) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicResponsiveHeader**(`data`): `MusicResponsiveHeader` + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L28) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicResponsiveHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### buttons + +> **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md) \| [`ToggleButton`](ToggleButton.md) \| [`DownloadButton`](DownloadButton.md) \| [`Menu`](Menu.md) \| [`MusicPlayButton`](MusicPlayButton.md)\> + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L19) + +*** + +### description? + +> `optional` **description**: [`MusicDescriptionShelf`](MusicDescriptionShelf.md) \| `null` + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L26) + +*** + +### second\_subtitle + +> **second\_subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L24) + +*** + +### strapline\_text\_one + +> **strapline\_text\_one**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L22) + +*** + +### strapline\_thumbnail + +> **strapline\_thumbnail**: [`MusicThumbnail`](MusicThumbnail.md) \| `null` + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L23) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L21) + +*** + +### subtitle\_badge? + +> `optional` **subtitle\_badge**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicInlineBadge`](MusicInlineBadge.md)\> + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L25) + +*** + +### thumbnail + +> **thumbnail**: [`MusicThumbnail`](MusicThumbnail.md) \| `null` + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L18) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L20) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicResponsiveHeader'` + +Defined in: [src/parser/classes/MusicResponsiveHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveHeader.ts#L16) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicResponsiveHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicResponsiveHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItem.md new file mode 100644 index 00000000..feae59b0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItem.md @@ -0,0 +1,469 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicResponsiveListItem + +# Class: MusicResponsiveListItem + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L23) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicResponsiveListItem**(`data`): `MusicResponsiveListItem` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:77](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L77) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicResponsiveListItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### album? + +> `optional` **album**: `object` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L44) + +#### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### id? + +> `optional` **id**: `string` + +#### name + +> **name**: `string` + +*** + +### artists? + +> `optional` **artists**: `object`[] + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:50](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L50) + +#### channel\_id? + +> `optional` **channel\_id**: `string` + +#### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### name + +> **name**: `string` + +*** + +### author? + +> `optional` **author**: `object` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:69](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L69) + +#### channel\_id? + +> `optional` **channel\_id**: `string` + +#### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### name + +> **name**: `string` + +*** + +### authors? + +> `optional` **authors**: `object`[] + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:57](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L57) + +#### channel\_id? + +> `optional` **channel\_id**: `string` + +#### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### name + +> **name**: `string` + +*** + +### badges? + +> `optional` **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L33) + +*** + +### duration? + +> `optional` **duration**: `object` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L39) + +#### seconds + +> **seconds**: `number` + +#### text + +> **text**: `string` + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L29) + +*** + +### fixed\_columns + +> **fixed\_columns**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicResponsiveListItemFixedColumn`](MusicResponsiveListItemFixedColumn.md)\> + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L27) + +*** + +### flex\_columns + +> **flex\_columns**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicResponsiveListItemFlexColumn`](MusicResponsiveListItemFlexColumn.md)\> + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L26) + +*** + +### id? + +> `optional` **id**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L37) + +*** + +### index? + +> `optional` **index**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L31) + +*** + +### item\_count? + +> `optional` **item\_count**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:74](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L74) + +*** + +### item\_type + +> **item\_type**: `"endpoint"` \| `"unknown"` \| `"video"` \| `"playlist"` \| `"album"` \| `"artist"` \| `"library_artist"` \| `"non_music_track"` \| `"song"` \| `"podcast_show"` \| `undefined` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L30) + +*** + +### menu? + +> `optional` **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L34) + +*** + +### name? + +> `optional` **name**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:63](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L63) + +*** + +### overlay? + +> `optional` **overlay**: [`MusicItemThumbnailOverlay`](MusicItemThumbnailOverlay.md) \| `null` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L35) + +*** + +### song\_count? + +> `optional` **song\_count**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:66](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L66) + +*** + +### subscribers? + +> `optional` **subscribers**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:65](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L65) + +*** + +### subtitle? + +> `optional` **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:64](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L64) + +*** + +### thumbnail? + +> `optional` **thumbnail**: [`MusicThumbnail`](MusicThumbnail.md) \| `null` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L32) + +*** + +### title? + +> `optional` **title**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L38) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### views? + +> `optional` **views**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:56](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L56) + +*** + +### year? + +> `optional` **year**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:75](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L75) + +*** + +### type + +> `static` **type**: `string` = `'MusicResponsiveListItem'` + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L24) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### thumbnails + +#### Get Signature + +> **get** **thumbnails**(): [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/MusicResponsiveListItem.ts:334](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItem.ts#L334) + +##### Returns + +[`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicResponsiveListItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicResponsiveListItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItemFixedColumn.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItemFixedColumn.md new file mode 100644 index 00000000..206304ff --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItemFixedColumn.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicResponsiveListItemFixedColumn + +# Class: MusicResponsiveListItemFixedColumn + +Defined in: [src/parser/classes/MusicResponsiveListItemFixedColumn.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFixedColumn.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicResponsiveListItemFixedColumn**(`data`): `MusicResponsiveListItemFixedColumn` + +Defined in: [src/parser/classes/MusicResponsiveListItemFixedColumn.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFixedColumn.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicResponsiveListItemFixedColumn` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### display\_priority + +> **display\_priority**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItemFixedColumn.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFixedColumn.ts#L9) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicResponsiveListItemFixedColumn.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFixedColumn.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'musicResponsiveListItemFlexColumnRenderer'` + +Defined in: [src/parser/classes/MusicResponsiveListItemFixedColumn.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFixedColumn.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicResponsiveListItemFixedColumn & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicResponsiveListItemFixedColumn & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItemFlexColumn.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItemFlexColumn.md new file mode 100644 index 00000000..6052d24c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicResponsiveListItemFlexColumn.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicResponsiveListItemFlexColumn + +# Class: MusicResponsiveListItemFlexColumn + +Defined in: [src/parser/classes/MusicResponsiveListItemFlexColumn.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFlexColumn.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicResponsiveListItemFlexColumn**(`data`): `MusicResponsiveListItemFlexColumn` + +Defined in: [src/parser/classes/MusicResponsiveListItemFlexColumn.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFlexColumn.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicResponsiveListItemFlexColumn` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### display\_priority + +> **display\_priority**: `string` + +Defined in: [src/parser/classes/MusicResponsiveListItemFlexColumn.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFlexColumn.ts#L9) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicResponsiveListItemFlexColumn.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFlexColumn.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicResponsiveListItemFlexColumn'` + +Defined in: [src/parser/classes/MusicResponsiveListItemFlexColumn.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicResponsiveListItemFlexColumn.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicResponsiveListItemFlexColumn & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicResponsiveListItemFlexColumn & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicShelf.md new file mode 100644 index 00000000..e9b42a1e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicShelf.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicShelf + +# Class: MusicShelf + +Defined in: [src/parser/classes/MusicShelf.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicShelf**(`data`): `MusicShelf` + +Defined in: [src/parser/classes/MusicShelf.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L19) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### bottom\_button? + +> `optional` **bottom\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/MusicShelf.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L16) + +*** + +### bottom\_text? + +> `optional` **bottom\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicShelf.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L15) + +*** + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MusicResponsiveListItem`](MusicResponsiveListItem.md)\> + +Defined in: [src/parser/classes/MusicShelf.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L12) + +*** + +### continuation? + +> `optional` **continuation**: `string` + +Defined in: [src/parser/classes/MusicShelf.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L14) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicShelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L13) + +*** + +### subheaders? + +> `optional` **subheaders**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/MusicShelf.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L17) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicShelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicShelf'` + +Defined in: [src/parser/classes/MusicShelf.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicShelf.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MusicSideAlignedItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicSideAlignedItem.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/MusicSideAlignedItem.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MusicSideAlignedItem.md index ca146cb5..6c48d901 100644 --- a/docs/api/namespaces/YTNodes/classes/MusicSideAlignedItem.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicSideAlignedItem.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MusicSideAlignedItem +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicSideAlignedItem # Class: MusicSideAlignedItem +Defined in: [src/parser/classes/MusicSideAlignedItem.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSideAlignedItem.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MusicSideAlignedItem() +### Constructor -> **new MusicSideAlignedItem**(`data`): [`MusicSideAlignedItem`](MusicSideAlignedItem.md) +> **new MusicSideAlignedItem**(`data`): `MusicSideAlignedItem` + +Defined in: [src/parser/classes/MusicSideAlignedItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSideAlignedItem.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MusicSideAlignedItem`](MusicSideAlignedItem.md) +`MusicSideAlignedItem` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MusicSideAlignedItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicSideAlignedItem.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > `optional` **end\_items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/MusicSideAlignedItem.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicSideAlignedItem.ts#L8) +Defined in: [src/parser/classes/MusicSideAlignedItem.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSideAlignedItem.ts#L8) *** @@ -44,9 +44,7 @@ > `optional` **start\_items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/MusicSideAlignedItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicSideAlignedItem.ts#L7) +Defined in: [src/parser/classes/MusicSideAlignedItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSideAlignedItem.ts#L7) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MusicSideAlignedItem'` +Defined in: [src/parser/classes/MusicSideAlignedItem.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSideAlignedItem.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MusicSideAlignedItem.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicSideAlignedItem.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MusicSideAlignedItem & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicSortFilterButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicSortFilterButton.md new file mode 100644 index 00000000..269fe7a8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicSortFilterButton.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicSortFilterButton + +# Class: MusicSortFilterButton + +Defined in: [src/parser/classes/MusicSortFilterButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSortFilterButton.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicSortFilterButton**(`data`): `MusicSortFilterButton` + +Defined in: [src/parser/classes/MusicSortFilterButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSortFilterButton.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicSortFilterButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/MusicSortFilterButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSortFilterButton.ts#L10) + +*** + +### menu + +> **menu**: [`MusicMultiSelectMenu`](MusicMultiSelectMenu.md) \| `null` + +Defined in: [src/parser/classes/MusicSortFilterButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSortFilterButton.ts#L11) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/MusicSortFilterButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSortFilterButton.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicSortFilterButton'` + +Defined in: [src/parser/classes/MusicSortFilterButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicSortFilterButton.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicSortFilterButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicSortFilterButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTastebuilderShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTastebuilderShelf.md new file mode 100644 index 00000000..44a2b8fc --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTastebuilderShelf.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicTastebuilderShelf + +# Class: MusicTastebuilderShelf + +Defined in: [src/parser/classes/MusicTastebuilderShelf.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelf.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicTastebuilderShelf**(`data`): `MusicTasteBuilderShelf` + +Defined in: [src/parser/classes/MusicTastebuilderShelf.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelf.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicTasteBuilderShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### action\_button + +> **action\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/MusicTastebuilderShelf.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelf.ts#L15) + +*** + +### is\_visible + +> **is\_visible**: `boolean` + +Defined in: [src/parser/classes/MusicTastebuilderShelf.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelf.ts#L16) + +*** + +### primary\_text + +> **primary\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicTastebuilderShelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelf.ts#L13) + +*** + +### secondary\_text + +> **secondary\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicTastebuilderShelf.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelf.ts#L14) + +*** + +### thumbnail + +> **thumbnail**: [`MusicTastebuilderShelfThumbnail`](MusicTastebuilderShelfThumbnail.md) \| `null` + +Defined in: [src/parser/classes/MusicTastebuilderShelf.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelf.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicTasteBuilderShelf'` + +Defined in: [src/parser/classes/MusicTastebuilderShelf.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelf.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicTastebuilderShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicTastebuilderShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/MusicTastebuilderShelfThumbnail.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTastebuilderShelfThumbnail.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/MusicTastebuilderShelfThumbnail.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTastebuilderShelfThumbnail.md index 1c635827..2e136f3b 100644 --- a/docs/api/namespaces/YTNodes/classes/MusicTastebuilderShelfThumbnail.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTastebuilderShelfThumbnail.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MusicTastebuilderShelfThumbnail +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicTastebuilderShelfThumbnail # Class: MusicTastebuilderShelfThumbnail +Defined in: [src/parser/classes/MusicTastebuilderShelfThumbnail.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelfThumbnail.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MusicTastebuilderShelfThumbnail() +### Constructor -> **new MusicTastebuilderShelfThumbnail**(`data`): [`MusicTastebuilderShelfThumbnail`](MusicTastebuilderShelfThumbnail.md) +> **new MusicTastebuilderShelfThumbnail**(`data`): `MusicTastebuilderShelfThumbnail` + +Defined in: [src/parser/classes/MusicTastebuilderShelfThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelfThumbnail.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MusicTastebuilderShelfThumbnail`](MusicTastebuilderShelfThumbnail.md) +`MusicTastebuilderShelfThumbnail` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MusicTastebuilderShelfThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicTastebuilderShelfThumbnail.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/MusicTastebuilderShelfThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicTastebuilderShelfThumbnail.ts#L8) +Defined in: [src/parser/classes/MusicTastebuilderShelfThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelfThumbnail.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MusicTastebuilderShelfThumbnail'` +Defined in: [src/parser/classes/MusicTastebuilderShelfThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTastebuilderShelfThumbnail.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MusicTastebuilderShelfThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicTastebuilderShelfThumbnail.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MusicTastebuilderShelfThumbnail & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/MusicThumbnail.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicThumbnail.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/MusicThumbnail.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/MusicThumbnail.md index deed540a..af10623a 100644 --- a/docs/api/namespaces/YTNodes/classes/MusicThumbnail.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicThumbnail.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / MusicThumbnail +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicThumbnail # Class: MusicThumbnail +Defined in: [src/parser/classes/MusicThumbnail.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicThumbnail.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new MusicThumbnail() +### Constructor -> **new MusicThumbnail**(`data`): [`MusicThumbnail`](MusicThumbnail.md) +> **new MusicThumbnail**(`data`): `MusicThumbnail` + +Defined in: [src/parser/classes/MusicThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicThumbnail.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`MusicThumbnail`](MusicThumbnail.md) +`MusicThumbnail` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/MusicThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicThumbnail.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/MusicThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicThumbnail.ts#L8) +Defined in: [src/parser/classes/MusicThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicThumbnail.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'MusicThumbnail'` +Defined in: [src/parser/classes/MusicThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicThumbnail.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/MusicThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/MusicThumbnail.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is MusicThumbnail & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTwoRowItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTwoRowItem.md new file mode 100644 index 00000000..4f71fbe7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicTwoRowItem.md @@ -0,0 +1,359 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicTwoRowItem + +# Class: MusicTwoRowItem + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L12) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicTwoRowItem**(`data`): `MusicTwoRowItem` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L42) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicTwoRowItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### artists? + +> `optional` **artists**: `object`[] + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L26) + +#### channel\_id + +> **channel\_id**: `string` \| `undefined` + +#### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) \| `undefined` + +#### name + +> **name**: `string` + +*** + +### author? + +> `optional` **author**: `object` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L32) + +#### channel\_id + +> **channel\_id**: `string` \| `undefined` + +#### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) \| `undefined` + +#### name + +> **name**: `string` + +*** + +### badges + +> **badges**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> \| `null` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L19) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L16) + +*** + +### id + +> **id**: `string` \| `undefined` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L17) + +*** + +### item\_count? + +> `optional` **item\_count**: `string` \| `null` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L22) + +*** + +### item\_type + +> **item\_type**: `string` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L20) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L40) + +*** + +### subscribers? + +> `optional` **subscribers**: `string` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L21) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L18) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L38) + +*** + +### thumbnail\_overlay + +> **thumbnail\_overlay**: [`MusicItemThumbnailOverlay`](MusicItemThumbnailOverlay.md) \| `null` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L39) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### views? + +> `optional` **views**: `string` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L24) + +*** + +### year? + +> `optional` **year**: `string` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L23) + +*** + +### type + +> `static` **type**: `string` = `'MusicTwoRowItem'` + +Defined in: [src/parser/classes/MusicTwoRowItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicTwoRowItem.ts#L13) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicTwoRowItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicTwoRowItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicVisualHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicVisualHeader.md new file mode 100644 index 00000000..ec1181ab --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/MusicVisualHeader.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / MusicVisualHeader + +# Class: MusicVisualHeader + +Defined in: [src/parser/classes/MusicVisualHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicVisualHeader.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new MusicVisualHeader**(`data`): `MusicVisualHeader` + +Defined in: [src/parser/classes/MusicVisualHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicVisualHeader.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`MusicVisualHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### foreground\_thumbnail + +> **foreground\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/MusicVisualHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicVisualHeader.ts#L13) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/MusicVisualHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicVisualHeader.ts#L12) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/MusicVisualHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicVisualHeader.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/MusicVisualHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicVisualHeader.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'MusicVisualHeader'` + +Defined in: [src/parser/classes/MusicVisualHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/MusicVisualHeader.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is MusicVisualHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is MusicVisualHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md new file mode 100644 index 00000000..3ad83722 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md @@ -0,0 +1,377 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / NavigationEndpoint + +# Class: NavigationEndpoint + +Defined in: [src/parser/classes/NavigationEndpoint.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L19) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new NavigationEndpoint**(`data`): `NavigationEndpoint` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L32) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`NavigationEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### command? + +> `optional` **command**: [`YTNode`](../../Helpers/classes/YTNode.md) \| [`YTNode`](../../Helpers/classes/YTNode.md) & [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<`any`\> + +Defined in: [src/parser/classes/NavigationEndpoint.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L29) + +*** + +### commands? + +> `optional` **commands**: `NavigationEndpoint`[] + +Defined in: [src/parser/classes/NavigationEndpoint.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L30) + +*** + +### dialog? + +> `optional` **dialog**: [`YTNode`](../../Helpers/classes/YTNode.md) \| [`CreatePlaylistDialog`](CreatePlaylistDialog.md) \| `null` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L24) + +*** + +### metadata + +> **metadata**: `Metadata` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L28) + +*** + +### modal? + +> `optional` **modal**: [`YTNode`](../../Helpers/classes/YTNode.md) \| [`ModalWithTitleAndButton`](ModalWithTitleAndButton.md) \| `null` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L25) + +*** + +### name? + +> `optional` **name**: `string` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L22) + +*** + +### next\_endpoint? + +> `optional` **next\_endpoint**: `NavigationEndpoint` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L27) + +*** + +### open\_popup? + +> `optional` **open\_popup**: [`OpenPopupAction`](OpenPopupAction.md) \| `null` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L26) + +*** + +### payload + +> **payload**: `any` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L23) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'NavigationEndpoint'` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L20) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### call() + +#### Call Signature + +> **call**\<`T`\>(`actions`, `args`): `Promise`\<`T`\> + +Defined in: [src/parser/classes/NavigationEndpoint.ts:121](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L121) + +##### Type Parameters + +###### T + +`T` *extends* [`IParsedResponse`](../../../../interfaces/IParsedResponse.md) + +##### Parameters + +###### actions + +[`Actions`](../../../../classes/Actions.md) + +###### args + +###### parse + +`true` + +##### Returns + +`Promise`\<`T`\> + +#### Call Signature + +> **call**(`actions`, `args?`): `Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +Defined in: [src/parser/classes/NavigationEndpoint.ts:122](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L122) + +##### Parameters + +###### actions + +[`Actions`](../../../../classes/Actions.md) + +###### args? + +###### parse? + +`false` + +##### Returns + +`Promise`\<[`ApiResponse`](../../../../interfaces/ApiResponse.md)\> + +*** + +### ~~getPath()~~ + +> **getPath**(`name`): `"/browse"` \| `"/player"` \| `"/search"` \| `"/next"` \| `"/live_chat/get_item_context_menu"` \| `undefined` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:105](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L105) + +Sometimes InnerTube does not return an API url, in that case the library should set it based on the name of the payload object. + +#### Parameters + +##### name + +`string` + +#### Returns + +`"/browse"` \| `"/player"` \| `"/search"` \| `"/next"` \| `"/live_chat/get_item_context_menu"` \| `undefined` + +#### Deprecated + +This should be removed in the future. + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is NavigationEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is NavigationEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) + +*** + +### toURL() + +> **toURL**(): `string` \| `undefined` + +Defined in: [src/parser/classes/NavigationEndpoint.ts:143](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NavigationEndpoint.ts#L143) + +#### Returns + +`string` \| `undefined` diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Notification.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Notification.md new file mode 100644 index 00000000..7b59b00a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Notification.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Notification + +# Class: Notification + +Defined in: [src/parser/classes/Notification.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Notification**(`data`): `Notification` + +Defined in: [src/parser/classes/Notification.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Notification` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Notification.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L15) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/Notification.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L17) + +*** + +### notification\_id + +> **notification\_id**: `string` + +Defined in: [src/parser/classes/Notification.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L14) + +*** + +### read + +> **read**: `boolean` + +Defined in: [src/parser/classes/Notification.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L18) + +*** + +### record\_click\_endpoint + +> **record\_click\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Notification.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L16) + +*** + +### sent\_time + +> **sent\_time**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Notification.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L13) + +*** + +### short\_message + +> **short\_message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Notification.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L12) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/Notification.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_thumbnails + +> **video\_thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/Notification.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L11) + +*** + +### type + +> `static` **type**: `string` = `'Notification'` + +Defined in: [src/parser/classes/Notification.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Notification.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Notification & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Notification & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/NotificationAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/NotificationAction.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/NotificationAction.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/NotificationAction.md index e1898044..79ab130b 100644 --- a/docs/api/namespaces/YTNodes/classes/NotificationAction.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/NotificationAction.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / NotificationAction +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / NotificationAction # Class: NotificationAction +Defined in: [src/parser/classes/NotificationAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NotificationAction.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new NotificationAction() +### Constructor -> **new NotificationAction**(`data`): [`NotificationAction`](NotificationAction.md) +> **new NotificationAction**(`data`): `NotificationAction` + +Defined in: [src/parser/classes/NotificationAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NotificationAction.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`NotificationAction`](NotificationAction.md) +`NotificationAction` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/NotificationAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/NotificationAction.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **response\_text**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/NotificationAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/NotificationAction.ts#L8) +Defined in: [src/parser/classes/NotificationAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NotificationAction.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'NotificationAction'` +Defined in: [src/parser/classes/NotificationAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/NotificationAction.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/NotificationAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/NotificationAction.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is NotificationAction & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/OpenOnePickAddVideoModalCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/OpenOnePickAddVideoModalCommand.md new file mode 100644 index 00000000..02fbfcf2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/OpenOnePickAddVideoModalCommand.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / OpenOnePickAddVideoModalCommand + +# Class: OpenOnePickAddVideoModalCommand + +Defined in: [src/parser/classes/OpenOnePickAddVideoModalCommand.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/OpenOnePickAddVideoModalCommand.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new OpenOnePickAddVideoModalCommand**(`data`): `OpenOnePickAddVideoModalCommand` + +Defined in: [src/parser/classes/OpenOnePickAddVideoModalCommand.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/OpenOnePickAddVideoModalCommand.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`OpenOnePickAddVideoModalCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### list\_id + +> **list\_id**: `string` + +Defined in: [src/parser/classes/OpenOnePickAddVideoModalCommand.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/OpenOnePickAddVideoModalCommand.ts#L7) + +*** + +### modal\_title + +> **modal\_title**: `string` + +Defined in: [src/parser/classes/OpenOnePickAddVideoModalCommand.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/OpenOnePickAddVideoModalCommand.ts#L8) + +*** + +### select\_button\_label + +> **select\_button\_label**: `string` + +Defined in: [src/parser/classes/OpenOnePickAddVideoModalCommand.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/OpenOnePickAddVideoModalCommand.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'OpenOnePickAddVideoModalCommand'` + +Defined in: [src/parser/classes/OpenOnePickAddVideoModalCommand.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/OpenOnePickAddVideoModalCommand.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is OpenOnePickAddVideoModalCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is OpenOnePickAddVideoModalCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/OpenPopupAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/OpenPopupAction.md new file mode 100644 index 00000000..917fa7a7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/OpenPopupAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / OpenPopupAction + +# Class: OpenPopupAction + +Defined in: [src/parser/classes/actions/OpenPopupAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/OpenPopupAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new OpenPopupAction**(`data`): `OpenPopupAction` + +Defined in: [src/parser/classes/actions/OpenPopupAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/OpenPopupAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`OpenPopupAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### popup + +> **popup**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/actions/OpenPopupAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/OpenPopupAction.ts#L8) + +*** + +### popup\_type + +> **popup\_type**: `string` + +Defined in: [src/parser/classes/actions/OpenPopupAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/OpenPopupAction.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'OpenPopupAction'` + +Defined in: [src/parser/classes/actions/OpenPopupAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/OpenPopupAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is OpenPopupAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is OpenPopupAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PageHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PageHeader.md new file mode 100644 index 00000000..68b60005 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PageHeader.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PageHeader + +# Class: PageHeader + +Defined in: [src/parser/classes/PageHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeader.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PageHeader**(`data`): `PageHeader` + +Defined in: [src/parser/classes/PageHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeader.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PageHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`PageHeaderView`](PageHeaderView.md) \| `null` + +Defined in: [src/parser/classes/PageHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeader.ts#L9) + +*** + +### page\_title + +> **page\_title**: `string` + +Defined in: [src/parser/classes/PageHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeader.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PageHeader'` + +Defined in: [src/parser/classes/PageHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeader.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PageHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PageHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PageHeaderView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PageHeaderView.md new file mode 100644 index 00000000..49e9385d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PageHeaderView.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PageHeaderView + +# Class: PageHeaderView + +Defined in: [src/parser/classes/PageHeaderView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L12) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PageHeaderView**(`data`): `PageHeaderView` + +Defined in: [src/parser/classes/PageHeaderView.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L25) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PageHeaderView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### actions + +> **actions**: [`FlexibleActionsView`](FlexibleActionsView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L20) + +*** + +### animated\_image + +> **animated\_image**: [`ContentPreviewImageView`](ContentPreviewImageView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L17) + +*** + +### attributation + +> **attributation**: [`AttributionView`](AttributionView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L22) + +*** + +### banner + +> **banner**: [`ImageBannerView`](ImageBannerView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L23) + +*** + +### description + +> **description**: [`DescriptionPreviewView`](DescriptionPreviewView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L21) + +*** + +### hero\_image + +> **hero\_image**: [`ContentPreviewImageView`](ContentPreviewImageView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L18) + +*** + +### image + +> **image**: [`DecoratedAvatarView`](DecoratedAvatarView.md) \| [`ContentPreviewImageView`](ContentPreviewImageView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L16) + +*** + +### metadata + +> **metadata**: [`ContentMetadataView`](ContentMetadataView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L19) + +*** + +### title + +> **title**: [`DynamicTextView`](DynamicTextView.md) \| `null` + +Defined in: [src/parser/classes/PageHeaderView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PageHeaderView'` + +Defined in: [src/parser/classes/PageHeaderView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageHeaderView.ts#L13) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PageHeaderView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PageHeaderView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PageIntroduction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PageIntroduction.md new file mode 100644 index 00000000..ec2d878b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PageIntroduction.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PageIntroduction + +# Class: PageIntroduction + +Defined in: [src/parser/classes/PageIntroduction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageIntroduction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PageIntroduction**(`data`): `PageIntroduction` + +Defined in: [src/parser/classes/PageIntroduction.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageIntroduction.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PageIntroduction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### body\_text + +> **body\_text**: `string` + +Defined in: [src/parser/classes/PageIntroduction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageIntroduction.ts#L9) + +*** + +### header\_icon\_type + +> **header\_icon\_type**: `string` + +Defined in: [src/parser/classes/PageIntroduction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageIntroduction.ts#L11) + +*** + +### header\_text + +> **header\_text**: `string` + +Defined in: [src/parser/classes/PageIntroduction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageIntroduction.ts#L8) + +*** + +### page\_title + +> **page\_title**: `string` + +Defined in: [src/parser/classes/PageIntroduction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageIntroduction.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PageIntroduction'` + +Defined in: [src/parser/classes/PageIntroduction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PageIntroduction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PageIntroduction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PageIntroduction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PanelFooterView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PanelFooterView.md new file mode 100644 index 00000000..9208ca6e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PanelFooterView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PanelFooterView + +# Class: PanelFooterView + +Defined in: [src/parser/classes/PanelFooterView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PanelFooterView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PanelFooterView**(`data`): `PanelFooterView` + +Defined in: [src/parser/classes/PanelFooterView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PanelFooterView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PanelFooterView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### primary\_button + +> **primary\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/PanelFooterView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PanelFooterView.ts#L8) + +*** + +### secondary\_button + +> **secondary\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/PanelFooterView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PanelFooterView.ts#L9) + +*** + +### should\_hide\_divider + +> **should\_hide\_divider**: `boolean` + +Defined in: [src/parser/classes/PanelFooterView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PanelFooterView.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PanelFooterView'` + +Defined in: [src/parser/classes/PanelFooterView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PanelFooterView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PanelFooterView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PanelFooterView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PdgCommentChip.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PdgCommentChip.md new file mode 100644 index 00000000..3d3b29c1 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PdgCommentChip.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PdgCommentChip + +# Class: PdgCommentChip + +Defined in: [src/parser/classes/comments/PdgCommentChip.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/PdgCommentChip.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PdgCommentChip**(`data`): `PdgCommentChip` + +Defined in: [src/parser/classes/comments/PdgCommentChip.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/PdgCommentChip.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PdgCommentChip` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### color\_pallette + +> **color\_pallette**: `object` + +Defined in: [src/parser/classes/comments/PdgCommentChip.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/PdgCommentChip.ts#L9) + +#### background\_color? + +> `optional` **background\_color**: `string` + +#### foreground\_title\_color? + +> `optional` **foreground\_title\_color**: `string` + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/comments/PdgCommentChip.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/PdgCommentChip.ts#L13) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/PdgCommentChip.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/PdgCommentChip.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PdgCommentChip'` + +Defined in: [src/parser/classes/comments/PdgCommentChip.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/PdgCommentChip.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PdgCommentChip & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PdgCommentChip & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PdgReplyButtonView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PdgReplyButtonView.md new file mode 100644 index 00000000..8779a22e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PdgReplyButtonView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PdgReplyButtonView + +# Class: PdgReplyButtonView + +Defined in: [src/parser/classes/livechat/items/PdgReplyButtonView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PdgReplyButtonView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PdgReplyButtonView**(`data`): `PdgReplyButtonView` + +Defined in: [src/parser/classes/livechat/items/PdgReplyButtonView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PdgReplyButtonView.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PdgReplyButtonView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### reply\_button + +> **reply\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/PdgReplyButtonView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PdgReplyButtonView.ts#L9) + +*** + +### reply\_count\_entity\_key + +> **reply\_count\_entity\_key**: `string` + +Defined in: [src/parser/classes/livechat/items/PdgReplyButtonView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PdgReplyButtonView.ts#L10) + +*** + +### reply\_count\_placeholder + +> **reply\_count\_placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/PdgReplyButtonView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PdgReplyButtonView.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PdgReplyButtonView'` + +Defined in: [src/parser/classes/livechat/items/PdgReplyButtonView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PdgReplyButtonView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PdgReplyButtonView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PdgReplyButtonView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PerformCommentActionEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PerformCommentActionEndpoint.md new file mode 100644 index 00000000..beba3a69 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PerformCommentActionEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PerformCommentActionEndpoint + +# Class: PerformCommentActionEndpoint + +Defined in: [src/parser/classes/endpoints/PerformCommentActionEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PerformCommentActionEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`PerformCommentActionRequest`](../../../../type-aliases/PerformCommentActionRequest.md)\> + +## Constructors + +### Constructor + +> **new PerformCommentActionEndpoint**(`data`): `PerformCommentActionEndpoint` + +Defined in: [src/parser/classes/endpoints/PerformCommentActionEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PerformCommentActionEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PerformCommentActionEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PerformCommentActionEndpoint'` + +Defined in: [src/parser/classes/endpoints/PerformCommentActionEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PerformCommentActionEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`PerformCommentActionRequest`](../../../../type-aliases/PerformCommentActionRequest.md) + +Defined in: [src/parser/classes/endpoints/PerformCommentActionEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PerformCommentActionEndpoint.ts#L20) + +#### Returns + +[`PerformCommentActionRequest`](../../../../type-aliases/PerformCommentActionRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/PerformCommentActionEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PerformCommentActionEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PerformCommentActionEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PerformCommentActionEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PivotBar.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PivotBar.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/PivotBar.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PivotBar.md index 7b21f1ac..6ff0b83a 100644 --- a/docs/api/namespaces/YTNodes/classes/PivotBar.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PivotBar.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PivotBar +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PivotBar # Class: PivotBar +Defined in: [src/parser/classes/mweb/PivotBar.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBar.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PivotBar() +### Constructor -> **new PivotBar**(`data`): [`PivotBar`](PivotBar.md) +> **new PivotBar**(`data`): `PivotBar` + +Defined in: [src/parser/classes/mweb/PivotBar.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBar.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PivotBar`](PivotBar.md) +`PivotBar` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/mweb/PivotBar.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/mweb/PivotBar.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/mweb/PivotBar.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/mweb/PivotBar.ts#L8) +Defined in: [src/parser/classes/mweb/PivotBar.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBar.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PivotBar'` +Defined in: [src/parser/classes/mweb/PivotBar.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBar.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/mweb/PivotBar.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/mweb/PivotBar.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PivotBar & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PivotBarItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PivotBarItem.md new file mode 100644 index 00000000..40090827 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PivotBarItem.md @@ -0,0 +1,277 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PivotBarItem + +# Class: PivotBarItem + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PivotBarItem**(`data`): `PivotBarItem` + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PivotBarItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L14) + +*** + +### accessibility\_label? + +> `optional` **accessibility\_label**: `string` + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L10) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L13) + +*** + +### pivot\_identifier + +> **pivot\_identifier**: `string` + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L9) + +*** + +### title + +> **title**: `Text` + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PivotBarItem'` + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### label + +#### Get Signature + +> **get** **label**(): `string` \| `undefined` + +Defined in: [src/parser/classes/mweb/PivotBarItem.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/PivotBarItem.ts#L33) + +##### Returns + +`string` \| `undefined` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PivotBarItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PivotBarItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PivotButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PivotButton.md new file mode 100644 index 00000000..38dee9d7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PivotButton.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PivotButton + +# Class: PivotButton + +Defined in: [src/parser/classes/PivotButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PivotButton**(`data`): `PivotButton` + +Defined in: [src/parser/classes/PivotButton.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PivotButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### background\_animation\_style + +> **background\_animation\_style**: `string` + +Defined in: [src/parser/classes/PivotButton.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L16) + +*** + +### content\_description + +> **content\_description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PivotButton.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/PivotButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L11) + +*** + +### sound\_attribution\_title + +> **sound\_attribution\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PivotButton.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L14) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/PivotButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L13) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/PivotButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### waveform\_animation\_style + +> **waveform\_animation\_style**: `string` + +Defined in: [src/parser/classes/PivotButton.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L15) + +*** + +### type + +> `static` **type**: `string` = `'PivotButton'` + +Defined in: [src/parser/classes/PivotButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PivotButton.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PivotButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PivotButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PlayerAnnotationsExpanded.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerAnnotationsExpanded.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/PlayerAnnotationsExpanded.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerAnnotationsExpanded.md index d4e8c7ee..f10c0ec8 100644 --- a/docs/api/namespaces/YTNodes/classes/PlayerAnnotationsExpanded.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerAnnotationsExpanded.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PlayerAnnotationsExpanded +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerAnnotationsExpanded # Class: PlayerAnnotationsExpanded +Defined in: [src/parser/classes/PlayerAnnotationsExpanded.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerAnnotationsExpanded.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PlayerAnnotationsExpanded() +### Constructor -> **new PlayerAnnotationsExpanded**(`data`): [`PlayerAnnotationsExpanded`](PlayerAnnotationsExpanded.md) +> **new PlayerAnnotationsExpanded**(`data`): `PlayerAnnotationsExpanded` + +Defined in: [src/parser/classes/PlayerAnnotationsExpanded.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerAnnotationsExpanded.ts#L21) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PlayerAnnotationsExpanded`](PlayerAnnotationsExpanded.md) +`PlayerAnnotationsExpanded` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/PlayerAnnotationsExpanded.ts:21](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerAnnotationsExpanded.ts#L21) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **allow\_swipe\_dismiss**: `boolean` -#### Defined in - -[src/parser/classes/PlayerAnnotationsExpanded.ts:18](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerAnnotationsExpanded.ts#L18) +Defined in: [src/parser/classes/PlayerAnnotationsExpanded.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerAnnotationsExpanded.ts#L18) *** @@ -44,9 +44,7 @@ > **annotation\_id**: `string` -#### Defined in - -[src/parser/classes/PlayerAnnotationsExpanded.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerAnnotationsExpanded.ts#L19) +Defined in: [src/parser/classes/PlayerAnnotationsExpanded.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerAnnotationsExpanded.ts#L19) *** @@ -54,6 +52,8 @@ > `optional` **featured\_channel**: `object` +Defined in: [src/parser/classes/PlayerAnnotationsExpanded.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerAnnotationsExpanded.ts#L9) + #### channel\_name > **channel\_name**: `string` @@ -72,61 +72,61 @@ #### subscribe\_button -> **subscribe\_button**: `null` \| [`YTNode`](../../Helpers/classes/YTNode.md) +> **subscribe\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` #### watermark > **watermark**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/PlayerAnnotationsExpanded.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerAnnotationsExpanded.ts#L9) - *** ### type > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PlayerAnnotationsExpanded'` +Defined in: [src/parser/classes/PlayerAnnotationsExpanded.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerAnnotationsExpanded.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/PlayerAnnotationsExpanded.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerAnnotationsExpanded.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -144,27 +144,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PlayerAnnotationsExpanded & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -178,27 +182,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -212,27 +220,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -249,7 +261,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerCaptionsTracklist.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerCaptionsTracklist.md new file mode 100644 index 00000000..0ddb3e5a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerCaptionsTracklist.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerCaptionsTracklist + +# Class: PlayerCaptionsTracklist + +Defined in: [src/parser/classes/PlayerCaptionsTracklist.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerCaptionsTracklist.ts#L14) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerCaptionsTracklist**(`data`): `PlayerCaptionsTracklist` + +Defined in: [src/parser/classes/PlayerCaptionsTracklist.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerCaptionsTracklist.ts#L35) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerCaptionsTracklist` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### audio\_tracks? + +> `optional` **audio\_tracks**: `object`[] + +Defined in: [src/parser/classes/PlayerCaptionsTracklist.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerCaptionsTracklist.ts#L19) + +#### audio\_track\_id + +> **audio\_track\_id**: `string` + +#### caption\_track\_indices + +> **caption\_track\_indices**: `number`[] + +#### captions\_initial\_state + +> **captions\_initial\_state**: `string` + +#### default\_caption\_track\_index? + +> `optional` **default\_caption\_track\_index**: `number` + +#### has\_default\_track + +> **has\_default\_track**: `boolean` + +#### visibility + +> **visibility**: `string` + +*** + +### caption\_tracks? + +> `optional` **caption\_tracks**: `CaptionTrackData`[] + +Defined in: [src/parser/classes/PlayerCaptionsTracklist.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerCaptionsTracklist.ts#L17) + +*** + +### default\_audio\_track\_index? + +> `optional` **default\_audio\_track\_index**: `number` + +Defined in: [src/parser/classes/PlayerCaptionsTracklist.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerCaptionsTracklist.ts#L28) + +*** + +### translation\_languages? + +> `optional` **translation\_languages**: `object`[] + +Defined in: [src/parser/classes/PlayerCaptionsTracklist.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerCaptionsTracklist.ts#L30) + +#### language\_code + +> **language\_code**: `string` + +#### language\_name + +> **language\_name**: [`Text`](../../Misc/classes/Text.md) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlayerCaptionsTracklist'` + +Defined in: [src/parser/classes/PlayerCaptionsTracklist.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerCaptionsTracklist.ts#L15) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerCaptionsTracklist & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerCaptionsTracklist & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerControlsOverlay.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerControlsOverlay.md new file mode 100644 index 00000000..51190df5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerControlsOverlay.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerControlsOverlay + +# Class: PlayerControlsOverlay + +Defined in: [src/parser/classes/PlayerControlsOverlay.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerControlsOverlay.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerControlsOverlay**(`data`): `PlayerControlsOverlay` + +Defined in: [src/parser/classes/PlayerControlsOverlay.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerControlsOverlay.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerControlsOverlay` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### overflow + +> **overflow**: [`PlayerOverflow`](PlayerOverflow.md) \| `null` + +Defined in: [src/parser/classes/PlayerControlsOverlay.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerControlsOverlay.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlayerControlsOverlay'` + +Defined in: [src/parser/classes/PlayerControlsOverlay.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerControlsOverlay.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerControlsOverlay & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerControlsOverlay & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerErrorMessage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerErrorMessage.md new file mode 100644 index 00000000..6696806e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerErrorMessage.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerErrorMessage + +# Class: PlayerErrorMessage + +Defined in: [src/parser/classes/PlayerErrorMessage.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerErrorMessage.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerErrorMessage**(`data`): `PlayerErrorMessage` + +Defined in: [src/parser/classes/PlayerErrorMessage.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerErrorMessage.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerErrorMessage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/PlayerErrorMessage.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerErrorMessage.ts#L14) + +*** + +### proceed\_button + +> **proceed\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/PlayerErrorMessage.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerErrorMessage.ts#L12) + +*** + +### reason + +> **reason**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerErrorMessage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerErrorMessage.ts#L11) + +*** + +### subreason + +> **subreason**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerErrorMessage.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerErrorMessage.ts#L10) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/PlayerErrorMessage.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerErrorMessage.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlayerErrorMessage'` + +Defined in: [src/parser/classes/PlayerErrorMessage.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerErrorMessage.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerErrorMessage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerErrorMessage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLegacyDesktopYpcOffer.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLegacyDesktopYpcOffer.md new file mode 100644 index 00000000..f9741bb4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLegacyDesktopYpcOffer.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerLegacyDesktopYpcOffer + +# Class: PlayerLegacyDesktopYpcOffer + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcOffer.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcOffer.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerLegacyDesktopYpcOffer**(`data`): `PlayerLegacyDesktopYpcOffer` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcOffer.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcOffer.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerLegacyDesktopYpcOffer` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### offer\_description + +> **offer\_description**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcOffer.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcOffer.ts#L9) + +*** + +### offer\_id + +> **offer\_id**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcOffer.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcOffer.ts#L10) + +*** + +### thumbnail + +> **thumbnail**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcOffer.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcOffer.ts#L8) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcOffer.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcOffer.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlayerLegacyDesktopYpcOffer'` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcOffer.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcOffer.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerLegacyDesktopYpcOffer & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerLegacyDesktopYpcOffer & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLegacyDesktopYpcTrailer.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLegacyDesktopYpcTrailer.md new file mode 100644 index 00000000..57be0a6a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLegacyDesktopYpcTrailer.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerLegacyDesktopYpcTrailer + +# Class: PlayerLegacyDesktopYpcTrailer + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerLegacyDesktopYpcTrailer**(`data`): `PlayerLegacyDesktopYpcTrailer` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerLegacyDesktopYpcTrailer` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### offer\_button\_text + +> **offer\_button\_text**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L14) + +*** + +### offer\_description + +> **offer\_description**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L12) + +*** + +### offer\_headline + +> **offer\_headline**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L11) + +*** + +### offer\_id + +> **offer\_id**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L13) + +*** + +### thumbnail + +> **thumbnail**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L10) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L9) + +*** + +### trailer + +> **trailer**: [`YpcTrailer`](YpcTrailer.md) \| `null` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L8) + +*** + +### video\_message + +> **video\_message**: `string` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L15) + +*** + +### type + +> `static` **type**: `string` = `'PlayerLegacyDesktopYpcTrailer'` + +Defined in: [src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLegacyDesktopYpcTrailer.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerLegacyDesktopYpcTrailer & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerLegacyDesktopYpcTrailer & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PlayerLiveStoryboardSpec.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLiveStoryboardSpec.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/PlayerLiveStoryboardSpec.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLiveStoryboardSpec.md index 9777cfac..20f2762e 100644 --- a/docs/api/namespaces/YTNodes/classes/PlayerLiveStoryboardSpec.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerLiveStoryboardSpec.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PlayerLiveStoryboardSpec +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerLiveStoryboardSpec # Class: PlayerLiveStoryboardSpec +Defined in: [src/parser/classes/PlayerLiveStoryboardSpec.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLiveStoryboardSpec.ts#L13) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PlayerLiveStoryboardSpec() +### Constructor -> **new PlayerLiveStoryboardSpec**(`data`): [`PlayerLiveStoryboardSpec`](PlayerLiveStoryboardSpec.md) +> **new PlayerLiveStoryboardSpec**(`data`): `PlayerLiveStoryboardSpec` + +Defined in: [src/parser/classes/PlayerLiveStoryboardSpec.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLiveStoryboardSpec.ts#L18) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PlayerLiveStoryboardSpec`](PlayerLiveStoryboardSpec.md) +`PlayerLiveStoryboardSpec` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/PlayerLiveStoryboardSpec.ts:18](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerLiveStoryboardSpec.ts#L18) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **board**: `LiveStoryboardData` -#### Defined in - -[src/parser/classes/PlayerLiveStoryboardSpec.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerLiveStoryboardSpec.ts#L16) +Defined in: [src/parser/classes/PlayerLiveStoryboardSpec.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLiveStoryboardSpec.ts#L16) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PlayerLiveStoryboardSpec'` +Defined in: [src/parser/classes/PlayerLiveStoryboardSpec.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerLiveStoryboardSpec.ts#L14) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/PlayerLiveStoryboardSpec.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerLiveStoryboardSpec.ts#L14) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PlayerLiveStoryboardSpec & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerMicroformat.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerMicroformat.md new file mode 100644 index 00000000..5b7aea8f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerMicroformat.md @@ -0,0 +1,375 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerMicroformat + +# Class: PlayerMicroformat + +Defined in: [src/parser/classes/PlayerMicroformat.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerMicroformat**(`data`): `PlayerMicroformat` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L41) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerMicroformat` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### available\_countries + +> **available\_countries**: `string`[] + +Defined in: [src/parser/classes/PlayerMicroformat.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L37) + +*** + +### category + +> **category**: `string` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L34) + +*** + +### channel + +> **channel**: `object` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L24) + +#### id + +> **id**: `string` + +#### name + +> **name**: `string` + +#### url + +> **url**: `string` + +*** + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerMicroformat.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L10) + +*** + +### embed? + +> `optional` **embed**: `object` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L13) + +#### flash\_secure\_url + +> **flash\_secure\_url**: `string` + +#### flash\_url + +> **flash\_url**: `string` + +#### height + +> **height**: `any` + +#### iframe\_url + +> **iframe\_url**: `string` + +#### width + +> **width**: `any` + +*** + +### end\_timestamp + +> **end\_timestamp**: `Date` \| `null` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L39) + +*** + +### has\_ypc\_metadata + +> **has\_ypc\_metadata**: `boolean` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L32) + +*** + +### is\_family\_safe + +> **is\_family\_safe**: `boolean` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L30) + +*** + +### is\_unlisted + +> **is\_unlisted**: `boolean` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L31) + +*** + +### length\_seconds + +> **length\_seconds**: `number` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L22) + +*** + +### publish\_date + +> **publish\_date**: `string` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L35) + +*** + +### start\_timestamp + +> **start\_timestamp**: `Date` \| `null` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L38) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/PlayerMicroformat.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerMicroformat.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### upload\_date + +> **upload\_date**: `string` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L36) + +*** + +### view\_count + +> **view\_count**: `number` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L33) + +*** + +### type + +> `static` **type**: `string` = `'PlayerMicroformat'` + +Defined in: [src/parser/classes/PlayerMicroformat.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerMicroformat.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerMicroformat & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerMicroformat & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PlayerOverflow.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverflow.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/PlayerOverflow.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverflow.md index b9a9066a..ba584998 100644 --- a/docs/api/namespaces/YTNodes/classes/PlayerOverflow.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverflow.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PlayerOverflow +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerOverflow # Class: PlayerOverflow +Defined in: [src/parser/classes/PlayerOverflow.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverflow.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PlayerOverflow() +### Constructor -> **new PlayerOverflow**(`data`): [`PlayerOverflow`](PlayerOverflow.md) +> **new PlayerOverflow**(`data`): `PlayerOverflow` + +Defined in: [src/parser/classes/PlayerOverflow.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverflow.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PlayerOverflow`](PlayerOverflow.md) +`PlayerOverflow` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/PlayerOverflow.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerOverflow.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **enable\_listen\_first**: `boolean` -#### Defined in - -[src/parser/classes/PlayerOverflow.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerOverflow.ts#L9) +Defined in: [src/parser/classes/PlayerOverflow.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverflow.ts#L9) *** @@ -44,9 +44,7 @@ > **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) -#### Defined in - -[src/parser/classes/PlayerOverflow.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerOverflow.ts#L8) +Defined in: [src/parser/classes/PlayerOverflow.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverflow.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PlayerOverflow'` +Defined in: [src/parser/classes/PlayerOverflow.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverflow.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/PlayerOverflow.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerOverflow.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PlayerOverflow & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlay.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlay.md new file mode 100644 index 00000000..0f0e18ef --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlay.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerOverlay + +# Class: PlayerOverlay + +Defined in: [src/parser/classes/PlayerOverlay.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerOverlay**(`data`): `PlayerOverlay` + +Defined in: [src/parser/classes/PlayerOverlay.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerOverlay` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### actions + +> **actions**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/PlayerOverlay.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L18) + +*** + +### add\_to\_menu + +> **add\_to\_menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlay.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L16) + +*** + +### autoplay + +> **autoplay**: [`PlayerOverlayAutoplay`](PlayerOverlayAutoplay.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlay.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L14) + +*** + +### browser\_media\_session + +> **browser\_media\_session**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlay.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L19) + +*** + +### decorated\_player\_bar + +> **decorated\_player\_bar**: [`DecoratedPlayerBar`](DecoratedPlayerBar.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlay.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L20) + +*** + +### end\_screen + +> **end\_screen**: [`WatchNextEndScreen`](WatchNextEndScreen.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlay.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L13) + +*** + +### fullscreen\_engagement + +> **fullscreen\_engagement**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlay.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L17) + +*** + +### share\_button + +> **share\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlay.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_details + +> **video\_details**: [`PlayerOverlayVideoDetails`](PlayerOverlayVideoDetails.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlay.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L21) + +*** + +### type + +> `static` **type**: `string` = `'PlayerOverlay'` + +Defined in: [src/parser/classes/PlayerOverlay.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlay.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerOverlay & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerOverlay & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlayAutoplay.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlayAutoplay.md new file mode 100644 index 00000000..177375cc --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlayAutoplay.md @@ -0,0 +1,319 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerOverlayAutoplay + +# Class: PlayerOverlayAutoplay + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerOverlayAutoplay**(`data`): `PlayerOverlayAutoplay` + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L28) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerOverlayAutoplay` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L23) + +*** + +### background + +> **background**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L21) + +*** + +### cancel\_button + +> **cancel\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L24) + +*** + +### close\_button + +> **close\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L26) + +*** + +### count\_down\_secs\_for\_fullscreen + +> **count\_down\_secs\_for\_fullscreen**: `any` + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L18) + +*** + +### next\_button + +> **next\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L25) + +*** + +### prefer\_immediate\_redirect + +> **prefer\_immediate\_redirect**: `any` + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L17) + +*** + +### published + +> **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L20) + +*** + +### short\_view\_count + +> **short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L14) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L22) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L12) + +*** + +### video\_title + +> **video\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L13) + +*** + +### type + +> `static` **type**: `string` = `'PlayerOverlayAutoplay'` + +Defined in: [src/parser/classes/PlayerOverlayAutoplay.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayAutoplay.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerOverlayAutoplay & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerOverlayAutoplay & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlayVideoDetails.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlayVideoDetails.md new file mode 100644 index 00000000..8f7aca04 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerOverlayVideoDetails.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerOverlayVideoDetails + +# Class: PlayerOverlayVideoDetails + +Defined in: [src/parser/classes/PlayerOverlayVideoDetails.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayVideoDetails.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlayerOverlayVideoDetails**(`data`): `PlayerOverlayVideoDetails` + +Defined in: [src/parser/classes/PlayerOverlayVideoDetails.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayVideoDetails.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlayerOverlayVideoDetails` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerOverlayVideoDetails.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayVideoDetails.ts#L9) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlayerOverlayVideoDetails.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayVideoDetails.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlayerOverlayVideoDetails'` + +Defined in: [src/parser/classes/PlayerOverlayVideoDetails.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerOverlayVideoDetails.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlayerOverlayVideoDetails & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlayerOverlayVideoDetails & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PlayerStoryboardSpec.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerStoryboardSpec.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/PlayerStoryboardSpec.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerStoryboardSpec.md index 85dc0736..553c921c 100644 --- a/docs/api/namespaces/YTNodes/classes/PlayerStoryboardSpec.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlayerStoryboardSpec.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PlayerStoryboardSpec +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlayerStoryboardSpec # Class: PlayerStoryboardSpec +Defined in: [src/parser/classes/PlayerStoryboardSpec.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerStoryboardSpec.ts#L16) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PlayerStoryboardSpec() +### Constructor -> **new PlayerStoryboardSpec**(`data`): [`PlayerStoryboardSpec`](PlayerStoryboardSpec.md) +> **new PlayerStoryboardSpec**(`data`): `PlayerStoryboardSpec` + +Defined in: [src/parser/classes/PlayerStoryboardSpec.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerStoryboardSpec.ts#L21) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PlayerStoryboardSpec`](PlayerStoryboardSpec.md) +`PlayerStoryboardSpec` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/PlayerStoryboardSpec.ts:21](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerStoryboardSpec.ts#L21) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **boards**: `StoryboardData`[] -#### Defined in - -[src/parser/classes/PlayerStoryboardSpec.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerStoryboardSpec.ts#L19) +Defined in: [src/parser/classes/PlayerStoryboardSpec.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerStoryboardSpec.ts#L19) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PlayerStoryboardSpec'` +Defined in: [src/parser/classes/PlayerStoryboardSpec.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlayerStoryboardSpec.ts#L17) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/PlayerStoryboardSpec.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlayerStoryboardSpec.ts#L17) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PlayerStoryboardSpec & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Playlist.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Playlist.md new file mode 100644 index 00000000..0ed000c5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Playlist.md @@ -0,0 +1,333 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Playlist + +# Class: Playlist + +Defined in: [src/parser/classes/Playlist.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`CompactMix`](CompactMix.md) +- [`CompactPlaylist`](CompactPlaylist.md) +- [`Mix`](Mix.md) + +## Constructors + +### Constructor + +> **new Playlist**(`data`): `Playlist` + +Defined in: [src/parser/classes/Playlist.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L28) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Playlist` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Text`](../../Misc/classes/Text.md) \| [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/Playlist.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L15) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Playlist.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L23) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Playlist.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L24) + +*** + +### first\_videos + +> **first\_videos**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Playlist.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L20) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/Playlist.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L13) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/Playlist.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L22) + +*** + +### share\_url + +> **share\_url**: `string` \| `null` + +Defined in: [src/parser/classes/Playlist.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L21) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Playlist.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L25) + +*** + +### thumbnail\_renderer? + +> `optional` **thumbnail\_renderer**: [`PlaylistCustomThumbnail`](PlaylistCustomThumbnail.md) \| [`PlaylistVideoThumbnail`](PlaylistVideoThumbnail.md) + +Defined in: [src/parser/classes/Playlist.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L17) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/Playlist.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L16) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Playlist.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Playlist.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L18) + +*** + +### video\_count\_short + +> **video\_count\_short**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Playlist.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L19) + +*** + +### view\_playlist? + +> `optional` **view\_playlist**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Playlist.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L26) + +*** + +### type + +> `static` **type**: `string` = `'Playlist'` + +Defined in: [src/parser/classes/Playlist.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Playlist.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Playlist & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Playlist & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistAddToOption.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistAddToOption.md new file mode 100644 index 00000000..f49be131 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistAddToOption.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistAddToOption + +# Class: PlaylistAddToOption + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistAddToOption**(`data`): `PlaylistAddToOption` + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistAddToOption` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### add\_to\_playlist\_service\_endpoint + +> **add\_to\_playlist\_service\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L13) + +*** + +### contains\_selected\_videos + +> **contains\_selected\_videos**: `"ALL"` \| `"NONE"` + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L14) + +*** + +### playlist\_id + +> **playlist\_id**: `string` + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L15) + +*** + +### privacy + +> **privacy**: `string` + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L16) + +*** + +### privacy\_icon + +> **privacy\_icon**: `PrivacyIcon` + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L17) + +*** + +### remove\_from\_playlist\_service\_endpoint + +> **remove\_from\_playlist\_service\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L18) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L19) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistAddToOption'` + +Defined in: [src/parser/classes/PlaylistAddToOption.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistAddToOption.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistAddToOption & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistAddToOption & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PlaylistCustomThumbnail.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistCustomThumbnail.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/PlaylistCustomThumbnail.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistCustomThumbnail.md index 2bdfb1a4..c5f2da28 100644 --- a/docs/api/namespaces/YTNodes/classes/PlaylistCustomThumbnail.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistCustomThumbnail.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PlaylistCustomThumbnail +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistCustomThumbnail # Class: PlaylistCustomThumbnail +Defined in: [src/parser/classes/PlaylistCustomThumbnail.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistCustomThumbnail.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PlaylistCustomThumbnail() +### Constructor -> **new PlaylistCustomThumbnail**(`data`): [`PlaylistCustomThumbnail`](PlaylistCustomThumbnail.md) +> **new PlaylistCustomThumbnail**(`data`): `PlaylistCustomThumbnail` + +Defined in: [src/parser/classes/PlaylistCustomThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistCustomThumbnail.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PlaylistCustomThumbnail`](PlaylistCustomThumbnail.md) +`PlaylistCustomThumbnail` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/PlaylistCustomThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlaylistCustomThumbnail.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/PlaylistCustomThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlaylistCustomThumbnail.ts#L8) +Defined in: [src/parser/classes/PlaylistCustomThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistCustomThumbnail.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PlaylistCustomThumbnail'` +Defined in: [src/parser/classes/PlaylistCustomThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistCustomThumbnail.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/PlaylistCustomThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlaylistCustomThumbnail.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistCustomThumbnail & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistEditEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistEditEndpoint.md new file mode 100644 index 00000000..085b37ea --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistEditEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistEditEndpoint + +# Class: PlaylistEditEndpoint + +Defined in: [src/parser/classes/endpoints/PlaylistEditEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PlaylistEditEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`PlaylistEditRequest`](../../../../type-aliases/PlaylistEditRequest.md)\> + +## Constructors + +### Constructor + +> **new PlaylistEditEndpoint**(`data`): `PlaylistEditEndpoint` + +Defined in: [src/parser/classes/endpoints/PlaylistEditEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PlaylistEditEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistEditEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistEditEndpoint'` + +Defined in: [src/parser/classes/endpoints/PlaylistEditEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PlaylistEditEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`PlaylistEditRequest`](../../../../type-aliases/PlaylistEditRequest.md) + +Defined in: [src/parser/classes/endpoints/PlaylistEditEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PlaylistEditEndpoint.ts#L20) + +#### Returns + +[`PlaylistEditRequest`](../../../../type-aliases/PlaylistEditRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/PlaylistEditEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PlaylistEditEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistEditEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistEditEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistHeader.md new file mode 100644 index 00000000..b3130a53 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistHeader.md @@ -0,0 +1,351 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistHeader + +# Class: PlaylistHeader + +Defined in: [src/parser/classes/PlaylistHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistHeader**(`data`): `PlaylistHeader` + +Defined in: [src/parser/classes/PlaylistHeader.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L27) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) \| `null` + +Defined in: [src/parser/classes/PlaylistHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L14) + +*** + +### banner + +> **banner**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistHeader.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L25) + +*** + +### brief\_stats + +> **brief\_stats**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/PlaylistHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L13) + +*** + +### can\_delete + +> **can\_delete**: `boolean` + +Defined in: [src/parser/classes/PlaylistHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L19) + +*** + +### can\_share + +> **can\_share**: `boolean` + +Defined in: [src/parser/classes/PlaylistHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L18) + +*** + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L15) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/PlaylistHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L9) + +*** + +### is\_editable + +> **is\_editable**: `boolean` + +Defined in: [src/parser/classes/PlaylistHeader.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L20) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistHeader.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L24) + +*** + +### num\_videos + +> **num\_videos**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L16) + +*** + +### privacy + +> **privacy**: `string` + +Defined in: [src/parser/classes/PlaylistHeader.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L21) + +*** + +### save\_button + +> **save\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistHeader.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L22) + +*** + +### shuffle\_play\_button + +> **shuffle\_play\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistHeader.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L23) + +*** + +### stats + +> **stats**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/PlaylistHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L12) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) \| `null` + +Defined in: [src/parser/classes/PlaylistHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_count + +> **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L17) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistHeader'` + +Defined in: [src/parser/classes/PlaylistHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistHeader.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistInfoCardContent.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistInfoCardContent.md new file mode 100644 index 00000000..9ec271b7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistInfoCardContent.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistInfoCardContent + +# Class: PlaylistInfoCardContent + +Defined in: [src/parser/classes/PlaylistInfoCardContent.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistInfoCardContent.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistInfoCardContent**(`data`): `PlaylistInfoCardContent` + +Defined in: [src/parser/classes/PlaylistInfoCardContent.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistInfoCardContent.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistInfoCardContent` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### channel\_name + +> **channel\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistInfoCardContent.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistInfoCardContent.ts#L13) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/PlaylistInfoCardContent.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistInfoCardContent.ts#L14) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/PlaylistInfoCardContent.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistInfoCardContent.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistInfoCardContent.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistInfoCardContent.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count + +> **video\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistInfoCardContent.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistInfoCardContent.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistInfoCardContent'` + +Defined in: [src/parser/classes/PlaylistInfoCardContent.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistInfoCardContent.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistInfoCardContent & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistInfoCardContent & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistMetadata.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistMetadata.md new file mode 100644 index 00000000..5f54b45f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistMetadata.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistMetadata + +# Class: PlaylistMetadata + +Defined in: [src/parser/classes/PlaylistMetadata.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistMetadata.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistMetadata**(`data`): `PlaylistMetadata` + +Defined in: [src/parser/classes/PlaylistMetadata.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistMetadata.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistMetadata` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: `string` + +Defined in: [src/parser/classes/PlaylistMetadata.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistMetadata.ts#L8) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/PlaylistMetadata.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistMetadata.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistMetadata'` + +Defined in: [src/parser/classes/PlaylistMetadata.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistMetadata.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistMetadata & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistMetadata & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanel.md new file mode 100644 index 00000000..6440a825 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanel.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistPanel + +# Class: PlaylistPanel + +Defined in: [src/parser/classes/PlaylistPanel.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistPanel**(`data`): `PlaylistPanel` + +Defined in: [src/parser/classes/PlaylistPanel.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistPanel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlaylistPanelVideo`](PlaylistPanelVideo.md) \| [`AutomixPreviewVideo`](AutomixPreviewVideo.md) \| [`PlaylistPanelVideoWrapper`](PlaylistPanelVideoWrapper.md)\> + +Defined in: [src/parser/classes/PlaylistPanel.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L13) + +*** + +### continuation + +> **continuation**: `string` + +Defined in: [src/parser/classes/PlaylistPanel.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L16) + +*** + +### is\_editable + +> **is\_editable**: `boolean` + +Defined in: [src/parser/classes/PlaylistPanel.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L17) + +*** + +### is\_infinite + +> **is\_infinite**: `boolean` + +Defined in: [src/parser/classes/PlaylistPanel.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L15) + +*** + +### num\_items\_to\_show + +> **num\_items\_to\_show**: `string` + +Defined in: [src/parser/classes/PlaylistPanel.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L19) + +*** + +### playlist\_id + +> **playlist\_id**: `string` + +Defined in: [src/parser/classes/PlaylistPanel.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L14) + +*** + +### preview\_description + +> **preview\_description**: `string` + +Defined in: [src/parser/classes/PlaylistPanel.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L18) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/PlaylistPanel.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L11) + +*** + +### title\_text + +> **title\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistPanel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistPanel'` + +Defined in: [src/parser/classes/PlaylistPanel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanel.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistPanel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistPanel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanelVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanelVideo.md new file mode 100644 index 00000000..84540488 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanelVideo.md @@ -0,0 +1,347 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistPanelVideo + +# Class: PlaylistPanelVideo + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistPanelVideo**(`data`): `PlaylistPanelVideo` + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L42) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistPanelVideo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### album? + +> `optional` **album**: `object` + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L25) + +#### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### id? + +> `optional` **id**: `string` + +#### name + +> **name**: `string` + +#### year? + +> `optional` **year**: `string` + +*** + +### artists? + +> `optional` **artists**: `object`[] + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L32) + +#### channel\_id? + +> `optional` **channel\_id**: `string` + +#### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### name + +> **name**: `string` + +*** + +### author + +> **author**: `string` + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L23) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L38) + +*** + +### duration + +> **duration**: `object` + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L18) + +#### seconds + +> **seconds**: `number` + +#### text + +> **text**: `string` + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L14) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L39) + +*** + +### selected + +> **selected**: `boolean` + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L15) + +*** + +### set\_video\_id? + +> `optional` **set\_video\_id**: `string` + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L40) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L16) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistPanelVideo'` + +Defined in: [src/parser/classes/PlaylistPanelVideo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideo.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistPanelVideo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistPanelVideo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanelVideoWrapper.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanelVideoWrapper.md new file mode 100644 index 00000000..dddf2b8c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistPanelVideoWrapper.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistPanelVideoWrapper + +# Class: PlaylistPanelVideoWrapper + +Defined in: [src/parser/classes/PlaylistPanelVideoWrapper.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideoWrapper.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistPanelVideoWrapper**(`data`): `PlaylistPanelVideoWrapper` + +Defined in: [src/parser/classes/PlaylistPanelVideoWrapper.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideoWrapper.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistPanelVideoWrapper` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### counterpart? + +> `optional` **counterpart**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlaylistPanelVideo`](PlaylistPanelVideo.md)\> + +Defined in: [src/parser/classes/PlaylistPanelVideoWrapper.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideoWrapper.ts#L9) + +*** + +### primary + +> **primary**: [`PlaylistPanelVideo`](PlaylistPanelVideo.md) \| `null` + +Defined in: [src/parser/classes/PlaylistPanelVideoWrapper.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideoWrapper.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistPanelVideoWrapper'` + +Defined in: [src/parser/classes/PlaylistPanelVideoWrapper.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistPanelVideoWrapper.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistPanelVideoWrapper & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistPanelVideoWrapper & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebar.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebar.md new file mode 100644 index 00000000..9f82ee85 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebar.md @@ -0,0 +1,237 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistSidebar + +# Class: PlaylistSidebar + +Defined in: [src/parser/classes/PlaylistSidebar.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebar.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistSidebar**(`data`): `PlaylistSidebar` + +Defined in: [src/parser/classes/PlaylistSidebar.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebar.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistSidebar` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/PlaylistSidebar.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebar.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistSidebar'` + +Defined in: [src/parser/classes/PlaylistSidebar.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebar.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/PlaylistSidebar.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebar.ts#L15) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistSidebar & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistSidebar & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebarPrimaryInfo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebarPrimaryInfo.md new file mode 100644 index 00000000..c341a167 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebarPrimaryInfo.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistSidebarPrimaryInfo + +# Class: PlaylistSidebarPrimaryInfo + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistSidebarPrimaryInfo**(`data`): `PlaylistSidebarPrimaryInfo` + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistSidebarPrimaryInfo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L13) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L12) + +*** + +### stats + +> **stats**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L9) + +*** + +### thumbnail\_renderer + +> **thumbnail\_renderer**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistSidebarPrimaryInfo'` + +Defined in: [src/parser/classes/PlaylistSidebarPrimaryInfo.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarPrimaryInfo.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistSidebarPrimaryInfo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistSidebarPrimaryInfo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebarSecondaryInfo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebarSecondaryInfo.md new file mode 100644 index 00000000..42e95eb0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistSidebarSecondaryInfo.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistSidebarSecondaryInfo + +# Class: PlaylistSidebarSecondaryInfo + +Defined in: [src/parser/classes/PlaylistSidebarSecondaryInfo.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarSecondaryInfo.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistSidebarSecondaryInfo**(`data`): `PlaylistSidebarSecondaryInfo` + +Defined in: [src/parser/classes/PlaylistSidebarSecondaryInfo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarSecondaryInfo.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistSidebarSecondaryInfo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button + +> **button**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistSidebarSecondaryInfo.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarSecondaryInfo.ts#L8) + +*** + +### owner + +> **owner**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/PlaylistSidebarSecondaryInfo.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarSecondaryInfo.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistSidebarSecondaryInfo'` + +Defined in: [src/parser/classes/PlaylistSidebarSecondaryInfo.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistSidebarSecondaryInfo.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistSidebarSecondaryInfo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistSidebarSecondaryInfo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistThumbnailOverlay.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistThumbnailOverlay.md new file mode 100644 index 00000000..f4a4a72c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistThumbnailOverlay.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistThumbnailOverlay + +# Class: PlaylistThumbnailOverlay + +Defined in: [src/parser/classes/PlaylistThumbnailOverlay.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistThumbnailOverlay.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistThumbnailOverlay**(`data`): `PlaylistThumbnailOverlay` + +Defined in: [src/parser/classes/PlaylistThumbnailOverlay.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistThumbnailOverlay.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistThumbnailOverlay` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/PlaylistThumbnailOverlay.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistThumbnailOverlay.ts#L8) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistThumbnailOverlay.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistThumbnailOverlay.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistThumbnailOverlay'` + +Defined in: [src/parser/classes/PlaylistThumbnailOverlay.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistThumbnailOverlay.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistThumbnailOverlay & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistThumbnailOverlay & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideo.md new file mode 100644 index 00000000..be620a21 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideo.md @@ -0,0 +1,371 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistVideo + +# Class: PlaylistVideo + +Defined in: [src/parser/classes/PlaylistVideo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistVideo**(`data`): `PlaylistVideo` + +Defined in: [src/parser/classes/PlaylistVideo.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L33) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistVideo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility\_label? + +> `optional` **accessibility\_label**: `string` + +Defined in: [src/parser/classes/PlaylistVideo.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L25) + +*** + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/PlaylistVideo.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L16) + +*** + +### duration + +> **duration**: `object` + +Defined in: [src/parser/classes/PlaylistVideo.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L28) + +#### seconds + +> **seconds**: `number` + +#### text + +> **text**: `string` + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/PlaylistVideo.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L20) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/PlaylistVideo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L13) + +*** + +### index + +> **index**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistVideo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L14) + +*** + +### is\_playable + +> **is\_playable**: `boolean` + +Defined in: [src/parser/classes/PlaylistVideo.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L21) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/PlaylistVideo.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L22) + +*** + +### set\_video\_id + +> **set\_video\_id**: `string` \| `undefined` + +Defined in: [src/parser/classes/PlaylistVideo.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L19) + +*** + +### style? + +> `optional` **style**: `string` + +Defined in: [src/parser/classes/PlaylistVideo.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L26) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/PlaylistVideo.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L18) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/PlaylistVideo.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L17) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistVideo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### upcoming? + +> `optional` **upcoming**: `Date` + +Defined in: [src/parser/classes/PlaylistVideo.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L23) + +*** + +### video\_info + +> **video\_info**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/PlaylistVideo.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L24) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistVideo'` + +Defined in: [src/parser/classes/PlaylistVideo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### is\_live + +#### Get Signature + +> **get** **is\_live**(): `boolean` + +Defined in: [src/parser/classes/PlaylistVideo.ts:63](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L63) + +##### Returns + +`boolean` + +*** + +### is\_upcoming + +#### Get Signature + +> **get** **is\_upcoming**(): `boolean` + +Defined in: [src/parser/classes/PlaylistVideo.ts:67](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideo.ts#L67) + +##### Returns + +`boolean` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistVideo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistVideo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideoList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideoList.md new file mode 100644 index 00000000..1a345ae9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideoList.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistVideoList + +# Class: PlaylistVideoList + +Defined in: [src/parser/classes/PlaylistVideoList.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoList.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PlaylistVideoList**(`data`): `PlaylistVideoList` + +Defined in: [src/parser/classes/PlaylistVideoList.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoList.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PlaylistVideoList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### can\_reorder + +> **can\_reorder**: `boolean` + +Defined in: [src/parser/classes/PlaylistVideoList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoList.ts#L9) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/PlaylistVideoList.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoList.ts#L7) + +*** + +### is\_editable + +> **is\_editable**: `boolean` + +Defined in: [src/parser/classes/PlaylistVideoList.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoList.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### videos + +> **videos**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/PlaylistVideoList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoList.ts#L10) + +*** + +### type + +> `static` **type**: `string` = `'PlaylistVideoList'` + +Defined in: [src/parser/classes/PlaylistVideoList.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoList.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistVideoList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PlaylistVideoList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PlaylistVideoThumbnail.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideoThumbnail.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/PlaylistVideoThumbnail.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideoThumbnail.md index aeee9a58..3b1fc458 100644 --- a/docs/api/namespaces/YTNodes/classes/PlaylistVideoThumbnail.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PlaylistVideoThumbnail.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PlaylistVideoThumbnail +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PlaylistVideoThumbnail # Class: PlaylistVideoThumbnail +Defined in: [src/parser/classes/PlaylistVideoThumbnail.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoThumbnail.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PlaylistVideoThumbnail() +### Constructor -> **new PlaylistVideoThumbnail**(`data`): [`PlaylistVideoThumbnail`](PlaylistVideoThumbnail.md) +> **new PlaylistVideoThumbnail**(`data`): `PlaylistVideoThumbnail` + +Defined in: [src/parser/classes/PlaylistVideoThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoThumbnail.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PlaylistVideoThumbnail`](PlaylistVideoThumbnail.md) +`PlaylistVideoThumbnail` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/PlaylistVideoThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlaylistVideoThumbnail.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/PlaylistVideoThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlaylistVideoThumbnail.ts#L8) +Defined in: [src/parser/classes/PlaylistVideoThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoThumbnail.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PlaylistVideoThumbnail'` +Defined in: [src/parser/classes/PlaylistVideoThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PlaylistVideoThumbnail.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/PlaylistVideoThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PlaylistVideoThumbnail.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistVideoThumbnail & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Poll.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Poll.md new file mode 100644 index 00000000..0993b1f2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Poll.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Poll + +# Class: Poll + +Defined in: [src/parser/classes/Poll.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Poll.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Poll**(`data`): `Poll` + +Defined in: [src/parser/classes/Poll.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Poll.ts#L25) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Poll` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### choices + +> **choices**: `object`[] + +Defined in: [src/parser/classes/Poll.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Poll.ts#L10) + +#### deselect\_endpoint + +> **deselect\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) \| `null` + +#### image + +> **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] \| `null` + +#### select\_endpoint + +> **select\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) \| `null` + +#### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +#### vote\_percentage\_if\_not\_selected + +> **vote\_percentage\_if\_not\_selected**: [`Text`](../../Misc/classes/Text.md) + +#### vote\_percentage\_if\_selected + +> **vote\_percentage\_if\_selected**: [`Text`](../../Misc/classes/Text.md) + +#### vote\_ratio\_if\_not\_selected + +> **vote\_ratio\_if\_not\_selected**: `number` \| `null` + +#### vote\_ratio\_if\_selected + +> **vote\_ratio\_if\_selected**: `number` \| `null` + +*** + +### live\_chat\_poll\_id? + +> `optional` **live\_chat\_poll\_id**: `string` + +Defined in: [src/parser/classes/Poll.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Poll.ts#L23) + +*** + +### poll\_type? + +> `optional` **poll\_type**: `string` + +Defined in: [src/parser/classes/Poll.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Poll.ts#L21) + +*** + +### total\_votes? + +> `optional` **total\_votes**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Poll.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Poll.ts#L22) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Poll'` + +Defined in: [src/parser/classes/Poll.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Poll.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Poll & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Poll & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PollHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PollHeader.md new file mode 100644 index 00000000..4f48d9f0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PollHeader.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PollHeader + +# Class: PollHeader + +Defined in: [src/parser/classes/livechat/items/PollHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PollHeader.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new PollHeader**(`data`): `PollHeader` + +Defined in: [src/parser/classes/livechat/items/PollHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PollHeader.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PollHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### context\_menu\_button + +> **context\_menu\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/livechat/items/PollHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PollHeader.ts#L15) + +*** + +### live\_chat\_poll\_type + +> **live\_chat\_poll\_type**: `string` + +Defined in: [src/parser/classes/livechat/items/PollHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PollHeader.ts#L14) + +*** + +### metadata + +> **metadata**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/PollHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PollHeader.ts#L13) + +*** + +### poll\_question + +> **poll\_question**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/items/PollHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PollHeader.ts#L11) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/livechat/items/PollHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PollHeader.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PollHeader'` + +Defined in: [src/parser/classes/livechat/items/PollHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/items/PollHeader.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PollHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PollHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Post.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Post.md new file mode 100644 index 00000000..93849012 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Post.md @@ -0,0 +1,371 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Post + +# Class: Post + +Defined in: [src/parser/classes/Post.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Post.ts#L4) + +## Extends + +- [`BackstagePost`](BackstagePost.md) + +## Constructors + +### Constructor + +> **new Post**(`data`): `Post` + +Defined in: [src/parser/classes/Post.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Post.ts#L7) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Post` + +#### Overrides + +[`BackstagePost`](BackstagePost.md).[`constructor`](BackstagePost.md#constructor) + +## Properties + +### action\_buttons? + +> `optional` **action\_buttons**: [`CommentActionButtons`](CommentActionButtons.md) \| `null` + +Defined in: [src/parser/classes/BackstagePost.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L21) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`action_buttons`](BackstagePost.md#action_buttons) + +*** + +### attachment + +> **attachment**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `undefined` + +Defined in: [src/parser/classes/BackstagePost.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L25) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`attachment`](BackstagePost.md#attachment) + +*** + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/BackstagePost.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L14) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`author`](BackstagePost.md#author) + +*** + +### content + +> **content**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BackstagePost.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L15) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`content`](BackstagePost.md#content) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/BackstagePost.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L24) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`endpoint`](BackstagePost.md#endpoint) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/BackstagePost.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L13) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`id`](BackstagePost.md#id) + +*** + +### menu? + +> `optional` **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/BackstagePost.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L20) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`menu`](BackstagePost.md#menu) + +*** + +### poll\_status? + +> `optional` **poll\_status**: `string` + +Defined in: [src/parser/classes/BackstagePost.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L17) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`poll_status`](BackstagePost.md#poll_status) + +*** + +### published + +> **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BackstagePost.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L16) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`published`](BackstagePost.md#published) + +*** + +### surface + +> **surface**: `string` + +Defined in: [src/parser/classes/BackstagePost.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L23) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`surface`](BackstagePost.md#surface) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`type`](BackstagePost.md#type) + +*** + +### vote\_button? + +> `optional` **vote\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/BackstagePost.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L22) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`vote_button`](BackstagePost.md#vote_button) + +*** + +### vote\_count? + +> `optional` **vote\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/BackstagePost.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L19) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`vote_count`](BackstagePost.md#vote_count) + +*** + +### vote\_status? + +> `optional` **vote\_status**: `string` + +Defined in: [src/parser/classes/BackstagePost.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/BackstagePost.ts#L18) + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`vote_status`](BackstagePost.md#vote_status) + +*** + +### type + +> `static` **type**: `string` = `'Post'` + +Defined in: [src/parser/classes/Post.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Post.ts#L5) + +#### Overrides + +[`BackstagePost`](BackstagePost.md).[`type`](BackstagePost.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`as`](BackstagePost.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Post & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Post & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`hasKey`](BackstagePost.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`is`](BackstagePost.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`BackstagePost`](BackstagePost.md).[`key`](BackstagePost.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PostMultiImage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PostMultiImage.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/PostMultiImage.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PostMultiImage.md index e4d8af20..c3b11bc5 100644 --- a/docs/api/namespaces/YTNodes/classes/PostMultiImage.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PostMultiImage.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PostMultiImage +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PostMultiImage # Class: PostMultiImage +Defined in: [src/parser/classes/PostMultiImage.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PostMultiImage.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PostMultiImage() +### Constructor -> **new PostMultiImage**(`data`): [`PostMultiImage`](PostMultiImage.md) +> **new PostMultiImage**(`data`): `PostMultiImage` + +Defined in: [src/parser/classes/PostMultiImage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PostMultiImage.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PostMultiImage`](PostMultiImage.md) +`PostMultiImage` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/PostMultiImage.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PostMultiImage.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **images**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`BackstageImage`](BackstageImage.md)\> -#### Defined in - -[src/parser/classes/PostMultiImage.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PostMultiImage.ts#L9) +Defined in: [src/parser/classes/PostMultiImage.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PostMultiImage.ts#L9) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PostMultiImage'` +Defined in: [src/parser/classes/PostMultiImage.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PostMultiImage.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/PostMultiImage.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PostMultiImage.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PostMultiImage & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/PrefetchWatchCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PrefetchWatchCommand.md new file mode 100644 index 00000000..c3db5f42 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PrefetchWatchCommand.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PrefetchWatchCommand + +# Class: PrefetchWatchCommand + +Defined in: [src/parser/classes/endpoints/PrefetchWatchCommand.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PrefetchWatchCommand.ts#L4) + +## Extends + +- [`WatchEndpoint`](WatchEndpoint.md) + +## Constructors + +### Constructor + +> **new PrefetchWatchCommand**(`data`): `PrefetchWatchCommand` + +Defined in: [src/parser/classes/endpoints/PrefetchWatchCommand.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PrefetchWatchCommand.ts#L7) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`PrefetchWatchCommand` + +#### Overrides + +[`WatchEndpoint`](WatchEndpoint.md).[`constructor`](WatchEndpoint.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`WatchEndpoint`](WatchEndpoint.md).[`type`](WatchEndpoint.md#type) + +*** + +### type + +> `static` **type**: `string` = `'PrefetchWatchCommand'` + +Defined in: [src/parser/classes/endpoints/PrefetchWatchCommand.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/PrefetchWatchCommand.ts#L5) + +#### Overrides + +[`WatchEndpoint`](WatchEndpoint.md).[`type`](WatchEndpoint.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`WatchEndpoint`](WatchEndpoint.md).[`as`](WatchEndpoint.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`WatchRequest`](../../../../type-aliases/WatchRequest.md) + +Defined in: [src/parser/classes/endpoints/WatchEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchEndpoint.ts#L20) + +#### Returns + +[`WatchRequest`](../../../../type-aliases/WatchRequest.md) + +#### Inherited from + +[`WatchEndpoint`](WatchEndpoint.md).[`buildRequest`](WatchEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/WatchEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchEndpoint.ts#L16) + +#### Returns + +`string` + +#### Inherited from + +[`WatchEndpoint`](WatchEndpoint.md).[`getApiPath`](WatchEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is PrefetchWatchCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is PrefetchWatchCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`WatchEndpoint`](WatchEndpoint.md).[`hasKey`](WatchEndpoint.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`WatchEndpoint`](WatchEndpoint.md).[`is`](WatchEndpoint.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`WatchEndpoint`](WatchEndpoint.md).[`key`](WatchEndpoint.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/PremiereTrailerBadge.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/PremiereTrailerBadge.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/PremiereTrailerBadge.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/PremiereTrailerBadge.md index 25d94560..e1b10462 100644 --- a/docs/api/namespaces/YTNodes/classes/PremiereTrailerBadge.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/PremiereTrailerBadge.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / PremiereTrailerBadge +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / PremiereTrailerBadge # Class: PremiereTrailerBadge +Defined in: [src/parser/classes/PremiereTrailerBadge.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PremiereTrailerBadge.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new PremiereTrailerBadge() +### Constructor -> **new PremiereTrailerBadge**(`data`): [`PremiereTrailerBadge`](PremiereTrailerBadge.md) +> **new PremiereTrailerBadge**(`data`): `PremiereTrailerBadge` + +Defined in: [src/parser/classes/PremiereTrailerBadge.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PremiereTrailerBadge.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`PremiereTrailerBadge`](PremiereTrailerBadge.md) +`PremiereTrailerBadge` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/PremiereTrailerBadge.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PremiereTrailerBadge.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **label**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/PremiereTrailerBadge.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PremiereTrailerBadge.ts#L8) +Defined in: [src/parser/classes/PremiereTrailerBadge.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PremiereTrailerBadge.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'PremiereTrailerBadge'` +Defined in: [src/parser/classes/PremiereTrailerBadge.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/PremiereTrailerBadge.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/PremiereTrailerBadge.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/PremiereTrailerBadge.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is PremiereTrailerBadge & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/ProductList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProductList.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/ProductList.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ProductList.md index 8f2ff576..a2591043 100644 --- a/docs/api/namespaces/YTNodes/classes/ProductList.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProductList.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ProductList +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ProductList # Class: ProductList +Defined in: [src/parser/classes/ProductList.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductList.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ProductList() +### Constructor -> **new ProductList**(`data`): [`ProductList`](ProductList.md) +> **new ProductList**(`data`): `ProductList` + +Defined in: [src/parser/classes/ProductList.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductList.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ProductList`](ProductList.md) +`ProductList` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ProductList.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProductList.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/ProductList.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProductList.ts#L9) +Defined in: [src/parser/classes/ProductList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductList.ts#L9) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ProductList'` +Defined in: [src/parser/classes/ProductList.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductList.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ProductList.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProductList.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ProductList & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/ProductListHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProductListHeader.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ProductListHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ProductListHeader.md index 50d36fb9..eb766134 100644 --- a/docs/api/namespaces/YTNodes/classes/ProductListHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProductListHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ProductListHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ProductListHeader # Class: ProductListHeader +Defined in: [src/parser/classes/ProductListHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ProductListHeader() +### Constructor -> **new ProductListHeader**(`data`): [`ProductListHeader`](ProductListHeader.md) +> **new ProductListHeader**(`data`): `ProductListHeader` + +Defined in: [src/parser/classes/ProductListHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListHeader.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ProductListHeader`](ProductListHeader.md) +`ProductListHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ProductListHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProductListHeader.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **suppress\_padding\_disclaimer**: `boolean` -#### Defined in - -[src/parser/classes/ProductListHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProductListHeader.ts#L9) +Defined in: [src/parser/classes/ProductListHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListHeader.ts#L9) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/ProductListHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProductListHeader.ts#L8) +Defined in: [src/parser/classes/ProductListHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListHeader.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ProductListHeader'` +Defined in: [src/parser/classes/ProductListHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ProductListHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProductListHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ProductListHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ProductListItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProductListItem.md new file mode 100644 index 00000000..e35e9d7b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProductListItem.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ProductListItem + +# Class: ProductListItem + +Defined in: [src/parser/classes/ProductListItem.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ProductListItem**(`data`): `ProductListItem` + +Defined in: [src/parser/classes/ProductListItem.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L20) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ProductListItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility\_title + +> **accessibility\_title**: `string` + +Defined in: [src/parser/classes/ProductListItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ProductListItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L15) + +*** + +### merchant\_name + +> **merchant\_name**: `string` + +Defined in: [src/parser/classes/ProductListItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L16) + +*** + +### price + +> **price**: `string` + +Defined in: [src/parser/classes/ProductListItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L14) + +*** + +### stay\_in\_app + +> **stay\_in\_app**: `boolean` + +Defined in: [src/parser/classes/ProductListItem.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L17) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ProductListItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ProductListItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_button + +> **view\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ProductListItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L18) + +*** + +### type + +> `static` **type**: `string` = `'ProductListItem'` + +Defined in: [src/parser/classes/ProductListItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProductListItem.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ProductListItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ProductListItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ProfileColumn.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumn.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ProfileColumn.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumn.md index 35a2fa3b..1a7fee00 100644 --- a/docs/api/namespaces/YTNodes/classes/ProfileColumn.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumn.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ProfileColumn +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ProfileColumn # Class: ProfileColumn +Defined in: [src/parser/classes/ProfileColumn.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumn.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ProfileColumn() +### Constructor -> **new ProfileColumn**(`data`): [`ProfileColumn`](ProfileColumn.md) +> **new ProfileColumn**(`data`): `ProfileColumn` + +Defined in: [src/parser/classes/ProfileColumn.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumn.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ProfileColumn`](ProfileColumn.md) +`ProfileColumn` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ProfileColumn.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProfileColumn.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/ProfileColumn.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProfileColumn.ts#L7) +Defined in: [src/parser/classes/ProfileColumn.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumn.ts#L7) *** @@ -44,59 +44,63 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ProfileColumn'` +Defined in: [src/parser/classes/ProfileColumn.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumn.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ProfileColumn.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProfileColumn.ts#L5) - ## Accessors ### contents -> `get` **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> +#### Get Signature -#### Returns +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ProfileColumn.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumn.ts#L15) + +##### Returns [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/ProfileColumn.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ProfileColumn.ts#L15) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -114,27 +118,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ProfileColumn & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -148,27 +156,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -182,27 +194,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -219,7 +235,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnStats.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnStats.md new file mode 100644 index 00000000..e6759490 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnStats.md @@ -0,0 +1,237 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ProfileColumnStats + +# Class: ProfileColumnStats + +Defined in: [src/parser/classes/ProfileColumnStats.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStats.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ProfileColumnStats**(`data`): `ProfileColumnStats` + +Defined in: [src/parser/classes/ProfileColumnStats.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStats.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ProfileColumnStats` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ProfileColumnStats.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStats.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ProfileColumnStats'` + +Defined in: [src/parser/classes/ProfileColumnStats.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStats.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ProfileColumnStats.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStats.ts#L15) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ProfileColumnStats & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ProfileColumnStats & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnStatsEntry.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnStatsEntry.md new file mode 100644 index 00000000..baaead42 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnStatsEntry.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ProfileColumnStatsEntry + +# Class: ProfileColumnStatsEntry + +Defined in: [src/parser/classes/ProfileColumnStatsEntry.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStatsEntry.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ProfileColumnStatsEntry**(`data`): `ProfileColumnStatsEntry` + +Defined in: [src/parser/classes/ProfileColumnStatsEntry.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStatsEntry.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ProfileColumnStatsEntry` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### label + +> **label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ProfileColumnStatsEntry.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStatsEntry.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### value + +> **value**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ProfileColumnStatsEntry.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStatsEntry.ts#L9) + +*** + +### type + +> `static` **type**: `string` = `'ProfileColumnStatsEntry'` + +Defined in: [src/parser/classes/ProfileColumnStatsEntry.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnStatsEntry.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ProfileColumnStatsEntry & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ProfileColumnStatsEntry & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnUserInfo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnUserInfo.md new file mode 100644 index 00000000..82ef4939 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ProfileColumnUserInfo.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ProfileColumnUserInfo + +# Class: ProfileColumnUserInfo + +Defined in: [src/parser/classes/ProfileColumnUserInfo.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnUserInfo.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ProfileColumnUserInfo**(`data`): `ProfileColumnUserInfo` + +Defined in: [src/parser/classes/ProfileColumnUserInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnUserInfo.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ProfileColumnUserInfo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ProfileColumnUserInfo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnUserInfo.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ProfileColumnUserInfo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnUserInfo.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ProfileColumnUserInfo'` + +Defined in: [src/parser/classes/ProfileColumnUserInfo.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ProfileColumnUserInfo.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ProfileColumnUserInfo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ProfileColumnUserInfo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Quiz.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Quiz.md new file mode 100644 index 00000000..b8333e52 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Quiz.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Quiz + +# Class: Quiz + +Defined in: [src/parser/classes/Quiz.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Quiz.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Quiz**(`data`): `Quiz` + +Defined in: [src/parser/classes/Quiz.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Quiz.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Quiz` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### choices + +> **choices**: `object`[] + +Defined in: [src/parser/classes/Quiz.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Quiz.ts#L8) + +#### is\_correct + +> **is\_correct**: `boolean` + +#### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +*** + +### total\_votes + +> **total\_votes**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Quiz.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Quiz.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Quiz'` + +Defined in: [src/parser/classes/Quiz.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Quiz.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Quiz & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Quiz & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RecognitionShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RecognitionShelf.md new file mode 100644 index 00000000..843d1119 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RecognitionShelf.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RecognitionShelf + +# Class: RecognitionShelf + +Defined in: [src/parser/classes/RecognitionShelf.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RecognitionShelf.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RecognitionShelf**(`data`): `RecognitionShelf` + +Defined in: [src/parser/classes/RecognitionShelf.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RecognitionShelf.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RecognitionShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### avatars + +> **avatars**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/RecognitionShelf.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RecognitionShelf.ts#L12) + +*** + +### button + +> **button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/RecognitionShelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RecognitionShelf.ts#L13) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RecognitionShelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RecognitionShelf.ts#L11) + +*** + +### surface + +> **surface**: `string` + +Defined in: [src/parser/classes/RecognitionShelf.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RecognitionShelf.ts#L14) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RecognitionShelf.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RecognitionShelf.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RecognitionShelf'` + +Defined in: [src/parser/classes/RecognitionShelf.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RecognitionShelf.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RecognitionShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RecognitionShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelItem.md new file mode 100644 index 00000000..c8d4b9d8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelItem.md @@ -0,0 +1,277 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ReelItem + +# Class: ReelItem + +Defined in: [src/parser/classes/ReelItem.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ReelItem**(`data`): `ReelItem` + +Defined in: [src/parser/classes/ReelItem.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ReelItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/ReelItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L16) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ReelItem.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L15) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/ReelItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L11) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ReelItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ReelItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### views + +> **views**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ReelItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L14) + +*** + +### type + +> `static` **type**: `string` = `'ReelItem'` + +Defined in: [src/parser/classes/ReelItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### label + +#### Get Signature + +> **get** **label**(): `string` \| `undefined` + +Defined in: [src/parser/classes/ReelItem.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelItem.ts#L34) + +##### Returns + +`string` \| `undefined` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ReelItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ReelItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelPlayerHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelPlayerHeader.md new file mode 100644 index 00000000..2ff5a8a3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelPlayerHeader.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ReelPlayerHeader + +# Class: ReelPlayerHeader + +Defined in: [src/parser/classes/ReelPlayerHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerHeader.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ReelPlayerHeader**(`data`): `ReelPlayerHeader` + +Defined in: [src/parser/classes/ReelPlayerHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerHeader.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ReelPlayerHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/ReelPlayerHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerHeader.ts#L14) + +*** + +### channel\_thumbnail + +> **channel\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ReelPlayerHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerHeader.ts#L13) + +*** + +### channel\_title\_text + +> **channel\_title\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ReelPlayerHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerHeader.ts#L12) + +*** + +### reel\_title\_text + +> **reel\_title\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ReelPlayerHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerHeader.ts#L10) + +*** + +### timestamp\_text + +> **timestamp\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ReelPlayerHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerHeader.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ReelPlayerHeader'` + +Defined in: [src/parser/classes/ReelPlayerHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerHeader.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ReelPlayerHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ReelPlayerHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelPlayerOverlay.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelPlayerOverlay.md new file mode 100644 index 00000000..eb1a99b7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelPlayerOverlay.md @@ -0,0 +1,303 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ReelPlayerOverlay + +# Class: ReelPlayerOverlay + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L11) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ReelPlayerOverlay**(`data`): `ReelPlayerOverlay` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ReelPlayerOverlay` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### info\_panel + +> **info\_panel**: [`InfoPanelContainer`](InfoPanelContainer.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L24) + +*** + +### like\_button + +> **like\_button**: [`LikeButton`](LikeButton.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L14) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L16) + +*** + +### next\_item\_button + +> **next\_item\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L17) + +*** + +### pivot\_button + +> **pivot\_button**: [`PivotButton`](PivotButton.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L23) + +*** + +### prev\_item\_button + +> **prev\_item\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L18) + +*** + +### reel\_player\_header\_supported\_renderers + +> **reel\_player\_header\_supported\_renderers**: [`ReelPlayerHeader`](ReelPlayerHeader.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L15) + +*** + +### share\_button + +> **share\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L22) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L20) + +*** + +### subscribe\_button\_renderer + +> **subscribe\_button\_renderer**: [`Button`](Button.md) \| [`SubscribeButton`](SubscribeButton.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L19) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_comments\_button + +> **view\_comments\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L21) + +*** + +### type + +> `static` **type**: `string` = `'ReelPlayerOverlay'` + +Defined in: [src/parser/classes/ReelPlayerOverlay.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelPlayerOverlay.ts#L12) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ReelPlayerOverlay & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ReelPlayerOverlay & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelShelf.md new file mode 100644 index 00000000..020e0d1a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelShelf.md @@ -0,0 +1,253 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ReelShelf + +# Class: ReelShelf + +Defined in: [src/parser/classes/ReelShelf.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelShelf.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ReelShelf**(`data`): `ReelShelf` + +Defined in: [src/parser/classes/ReelShelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelShelf.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ReelShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ReelShelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelShelf.ts#L11) + +*** + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ReelShelf.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelShelf.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ReelShelf.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelShelf.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ReelShelf'` + +Defined in: [src/parser/classes/ReelShelf.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelShelf.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/ReelShelf.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ReelShelf.ts#L24) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ReelShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ReelShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelWatchEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelWatchEndpoint.md new file mode 100644 index 00000000..181d54ac --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReelWatchEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ReelWatchEndpoint + +# Class: ReelWatchEndpoint + +Defined in: [src/parser/classes/endpoints/ReelWatchEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ReelWatchEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`ReelWatchRequest`](../../../../type-aliases/ReelWatchRequest.md)\> + +## Constructors + +### Constructor + +> **new ReelWatchEndpoint**(`data`): `ReelWatchEndpoint` + +Defined in: [src/parser/classes/endpoints/ReelWatchEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ReelWatchEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ReelWatchEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ReelWatchEndpoint'` + +Defined in: [src/parser/classes/endpoints/ReelWatchEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ReelWatchEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`ReelWatchRequest`](../../../../type-aliases/ReelWatchRequest.md) + +Defined in: [src/parser/classes/endpoints/ReelWatchEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ReelWatchEndpoint.ts#L20) + +#### Returns + +[`ReelWatchRequest`](../../../../type-aliases/ReelWatchRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/ReelWatchEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ReelWatchEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ReelWatchEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ReelWatchEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/RelatedChipCloud.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RelatedChipCloud.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/RelatedChipCloud.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/RelatedChipCloud.md index bdd97080..1b468372 100644 --- a/docs/api/namespaces/YTNodes/classes/RelatedChipCloud.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RelatedChipCloud.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / RelatedChipCloud +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RelatedChipCloud # Class: RelatedChipCloud +Defined in: [src/parser/classes/RelatedChipCloud.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RelatedChipCloud.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new RelatedChipCloud() +### Constructor -> **new RelatedChipCloud**(`data`): [`RelatedChipCloud`](RelatedChipCloud.md) +> **new RelatedChipCloud**(`data`): `RelatedChipCloud` + +Defined in: [src/parser/classes/RelatedChipCloud.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RelatedChipCloud.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`RelatedChipCloud`](RelatedChipCloud.md) +`RelatedChipCloud` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/RelatedChipCloud.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RelatedChipCloud.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **content**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/RelatedChipCloud.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RelatedChipCloud.ts#L7) +Defined in: [src/parser/classes/RelatedChipCloud.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RelatedChipCloud.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'RelatedChipCloud'` +Defined in: [src/parser/classes/RelatedChipCloud.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RelatedChipCloud.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/RelatedChipCloud.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RelatedChipCloud.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is RelatedChipCloud & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveBannerForLiveChatCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveBannerForLiveChatCommand.md new file mode 100644 index 00000000..714dda4f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveBannerForLiveChatCommand.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RemoveBannerForLiveChatCommand + +# Class: RemoveBannerForLiveChatCommand + +Defined in: [src/parser/classes/livechat/RemoveBannerForLiveChatCommand.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveBannerForLiveChatCommand.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RemoveBannerForLiveChatCommand**(`data`): `RemoveBannerForLiveChatCommand` + +Defined in: [src/parser/classes/livechat/RemoveBannerForLiveChatCommand.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveBannerForLiveChatCommand.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RemoveBannerForLiveChatCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### target\_action\_id + +> **target\_action\_id**: `string` + +Defined in: [src/parser/classes/livechat/RemoveBannerForLiveChatCommand.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveBannerForLiveChatCommand.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RemoveBannerForLiveChatCommand'` + +Defined in: [src/parser/classes/livechat/RemoveBannerForLiveChatCommand.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveBannerForLiveChatCommand.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RemoveBannerForLiveChatCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RemoveBannerForLiveChatCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveChatItemAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveChatItemAction.md new file mode 100644 index 00000000..edc13a54 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveChatItemAction.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RemoveChatItemAction + +# Class: RemoveChatItemAction + +Defined in: [src/parser/classes/livechat/RemoveChatItemAction.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveChatItemAction.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RemoveChatItemAction**(`data`): `RemoveChatItemAction` + +Defined in: [src/parser/classes/livechat/RemoveChatItemAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveChatItemAction.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RemoveChatItemAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### target\_item\_id + +> **target\_item\_id**: `string` + +Defined in: [src/parser/classes/livechat/RemoveChatItemAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveChatItemAction.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RemoveChatItemAction'` + +Defined in: [src/parser/classes/livechat/RemoveChatItemAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveChatItemAction.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RemoveChatItemAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RemoveChatItemAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveChatItemByAuthorAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveChatItemByAuthorAction.md new file mode 100644 index 00000000..264330df --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RemoveChatItemByAuthorAction.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RemoveChatItemByAuthorAction + +# Class: RemoveChatItemByAuthorAction + +Defined in: [src/parser/classes/livechat/RemoveChatItemByAuthorAction.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveChatItemByAuthorAction.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RemoveChatItemByAuthorAction**(`data`): `RemoveChatItemByAuthorAction` + +Defined in: [src/parser/classes/livechat/RemoveChatItemByAuthorAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveChatItemByAuthorAction.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RemoveChatItemByAuthorAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### external\_channel\_id + +> **external\_channel\_id**: `string` + +Defined in: [src/parser/classes/livechat/RemoveChatItemByAuthorAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveChatItemByAuthorAction.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RemoveChatItemByAuthorAction'` + +Defined in: [src/parser/classes/livechat/RemoveChatItemByAuthorAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/RemoveChatItemByAuthorAction.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RemoveChatItemByAuthorAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RemoveChatItemByAuthorAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplaceChatItemAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplaceChatItemAction.md new file mode 100644 index 00000000..274fcff5 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplaceChatItemAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ReplaceChatItemAction + +# Class: ReplaceChatItemAction + +Defined in: [src/parser/classes/livechat/ReplaceChatItemAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceChatItemAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ReplaceChatItemAction**(`data`): `ReplaceChatItemAction` + +Defined in: [src/parser/classes/livechat/ReplaceChatItemAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceChatItemAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ReplaceChatItemAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### replacement\_item + +> **replacement\_item**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/ReplaceChatItemAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceChatItemAction.ts#L9) + +*** + +### target\_item\_id + +> **target\_item\_id**: `string` + +Defined in: [src/parser/classes/livechat/ReplaceChatItemAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceChatItemAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ReplaceChatItemAction'` + +Defined in: [src/parser/classes/livechat/ReplaceChatItemAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceChatItemAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ReplaceChatItemAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ReplaceChatItemAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplaceLiveChatAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplaceLiveChatAction.md new file mode 100644 index 00000000..4c8f7e36 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplaceLiveChatAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ReplaceLiveChatAction + +# Class: ReplaceLiveChatAction + +Defined in: [src/parser/classes/livechat/ReplaceLiveChatAction.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceLiveChatAction.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ReplaceLiveChatAction**(`data`): `ReplaceLiveChatAction` + +Defined in: [src/parser/classes/livechat/ReplaceLiveChatAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceLiveChatAction.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ReplaceLiveChatAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### replacement + +> **replacement**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/livechat/ReplaceLiveChatAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceLiveChatAction.ts#L8) + +*** + +### to\_replace + +> **to\_replace**: `string` + +Defined in: [src/parser/classes/livechat/ReplaceLiveChatAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceLiveChatAction.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ReplaceLiveChatAction'` + +Defined in: [src/parser/classes/livechat/ReplaceLiveChatAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplaceLiveChatAction.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ReplaceLiveChatAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ReplaceLiveChatAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplayChatItemAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplayChatItemAction.md new file mode 100644 index 00000000..0758ed64 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ReplayChatItemAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ReplayChatItemAction + +# Class: ReplayChatItemAction + +Defined in: [src/parser/classes/livechat/ReplayChatItemAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplayChatItemAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ReplayChatItemAction**(`data`): `ReplayChatItemAction` + +Defined in: [src/parser/classes/livechat/ReplayChatItemAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplayChatItemAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ReplayChatItemAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### actions + +> **actions**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/livechat/ReplayChatItemAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplayChatItemAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_offset\_time\_msec + +> **video\_offset\_time\_msec**: `string` + +Defined in: [src/parser/classes/livechat/ReplayChatItemAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplayChatItemAction.ts#L9) + +*** + +### type + +> `static` **type**: `string` = `'ReplayChatItemAction'` + +Defined in: [src/parser/classes/livechat/ReplayChatItemAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ReplayChatItemAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ReplayChatItemAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ReplayChatItemAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/RichGrid.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichGrid.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/RichGrid.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/RichGrid.md index bc6e45fb..6c3cf5d9 100644 --- a/docs/api/namespaces/YTNodes/classes/RichGrid.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichGrid.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / RichGrid +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RichGrid # Class: RichGrid +Defined in: [src/parser/classes/RichGrid.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichGrid.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new RichGrid() +### Constructor -> **new RichGrid**(`data`): [`RichGrid`](RichGrid.md) +> **new RichGrid**(`data`): `RichGrid` + +Defined in: [src/parser/classes/RichGrid.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichGrid.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`RichGrid`](RichGrid.md) +`RichGrid` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/RichGrid.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichGrid.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/RichGrid.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichGrid.ts#L8) +Defined in: [src/parser/classes/RichGrid.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichGrid.ts#L8) *** @@ -44,9 +44,7 @@ > **header**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/RichGrid.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichGrid.ts#L7) +Defined in: [src/parser/classes/RichGrid.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichGrid.ts#L7) *** @@ -54,9 +52,7 @@ > `optional` **target\_id**: `string` -#### Defined in - -[src/parser/classes/RichGrid.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichGrid.ts#L9) +Defined in: [src/parser/classes/RichGrid.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichGrid.ts#L9) *** @@ -64,45 +60,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'RichGrid'` +Defined in: [src/parser/classes/RichGrid.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichGrid.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/RichGrid.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichGrid.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -120,27 +120,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is RichGrid & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -154,27 +158,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -188,27 +196,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -225,7 +237,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/RichItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichItem.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/RichItem.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/RichItem.md index f620c986..93d16791 100644 --- a/docs/api/namespaces/YTNodes/classes/RichItem.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichItem.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / RichItem +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RichItem # Class: RichItem +Defined in: [src/parser/classes/RichItem.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichItem.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new RichItem() +### Constructor -> **new RichItem**(`data`): [`RichItem`](RichItem.md) +> **new RichItem**(`data`): `RichItem` + +Defined in: [src/parser/classes/RichItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichItem.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`RichItem`](RichItem.md) +`RichItem` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/RichItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichItem.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **content**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/RichItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichItem.ts#L7) +Defined in: [src/parser/classes/RichItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichItem.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'RichItem'` +Defined in: [src/parser/classes/RichItem.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichItem.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/RichItem.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichItem.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is RichItem & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RichListHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichListHeader.md new file mode 100644 index 00000000..d3568609 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichListHeader.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RichListHeader + +# Class: RichListHeader + +Defined in: [src/parser/classes/RichListHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichListHeader.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RichListHeader**(`data`): `RichListHeader` + +Defined in: [src/parser/classes/RichListHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichListHeader.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RichListHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/RichListHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichListHeader.ts#L11) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RichListHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichListHeader.ts#L9) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RichListHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichListHeader.ts#L8) + +*** + +### title\_style? + +> `optional` **title\_style**: `string` + +Defined in: [src/parser/classes/RichListHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichListHeader.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RichListHeader'` + +Defined in: [src/parser/classes/RichListHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichListHeader.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RichListHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RichListHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RichMetadata.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichMetadata.md new file mode 100644 index 00000000..da479d43 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichMetadata.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RichMetadata + +# Class: RichMetadata + +Defined in: [src/parser/classes/RichMetadata.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RichMetadata**(`data`): `RichMetadata` + +Defined in: [src/parser/classes/RichMetadata.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RichMetadata` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### call\_to\_action + +> **call\_to\_action**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RichMetadata.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L13) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/RichMetadata.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L15) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/RichMetadata.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L14) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RichMetadata.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L12) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/RichMetadata.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RichMetadata.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RichMetadata'` + +Defined in: [src/parser/classes/RichMetadata.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadata.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RichMetadata & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RichMetadata & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/RichMetadataRow.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichMetadataRow.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/RichMetadataRow.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/RichMetadataRow.md index b951fcc9..939576c1 100644 --- a/docs/api/namespaces/YTNodes/classes/RichMetadataRow.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichMetadataRow.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / RichMetadataRow +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RichMetadataRow # Class: RichMetadataRow +Defined in: [src/parser/classes/RichMetadataRow.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadataRow.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new RichMetadataRow() +### Constructor -> **new RichMetadataRow**(`data`): [`RichMetadataRow`](RichMetadataRow.md) +> **new RichMetadataRow**(`data`): `RichMetadataRow` + +Defined in: [src/parser/classes/RichMetadataRow.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadataRow.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`RichMetadataRow`](RichMetadataRow.md) +`RichMetadataRow` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/RichMetadataRow.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichMetadataRow.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/RichMetadataRow.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichMetadataRow.ts#L7) +Defined in: [src/parser/classes/RichMetadataRow.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadataRow.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'RichMetadataRow'` +Defined in: [src/parser/classes/RichMetadataRow.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichMetadataRow.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/RichMetadataRow.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/RichMetadataRow.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is RichMetadataRow & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RichSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichSection.md new file mode 100644 index 00000000..4ad4bb19 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichSection.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RichSection + +# Class: RichSection + +Defined in: [src/parser/classes/RichSection.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichSection.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RichSection**(`data`): `RichSection` + +Defined in: [src/parser/classes/RichSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichSection.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RichSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/RichSection.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichSection.ts#L7) + +*** + +### full\_bleed + +> **full\_bleed**: `boolean` + +Defined in: [src/parser/classes/RichSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichSection.ts#L8) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/RichSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichSection.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RichSection'` + +Defined in: [src/parser/classes/RichSection.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichSection.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RichSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RichSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RichShelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichShelf.md new file mode 100644 index 00000000..fef6fb22 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RichShelf.md @@ -0,0 +1,311 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RichShelf + +# Class: RichShelf + +Defined in: [src/parser/classes/RichShelf.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RichShelf**(`data`): `RichShelf` + +Defined in: [src/parser/classes/RichShelf.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RichShelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/RichShelf.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L10) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/RichShelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L11) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/RichShelf.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L21) + +*** + +### is\_bottom\_divider\_hidden + +> **is\_bottom\_divider\_hidden**: `boolean` + +Defined in: [src/parser/classes/RichShelf.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L14) + +*** + +### is\_expanded + +> **is\_expanded**: `boolean` + +Defined in: [src/parser/classes/RichShelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L13) + +*** + +### is\_top\_divider\_hidden + +> **is\_top\_divider\_hidden**: `boolean` + +Defined in: [src/parser/classes/RichShelf.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L15) + +*** + +### layout\_sizing? + +> `optional` **layout\_sizing**: `"RICH_GRID_LAYOUT_SIZING_UNSPECIFIED"` \| `"RICH_GRID_LAYOUT_SIZING_STANDARD"` \| `"RICH_GRID_LAYOUT_SIZING_COMPACT"` \| `"RICH_GRID_LAYOUT_SIZING_EXTRA_COMPACT"` \| `"RICH_GRID_LAYOUT_SIZING_TINY"` + +Defined in: [src/parser/classes/RichShelf.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L16) + +*** + +### menu + +> **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/RichShelf.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L22) + +*** + +### next\_button + +> **next\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/RichShelf.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L23) + +*** + +### previous\_button + +> **previous\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/RichShelf.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L24) + +*** + +### subtitle? + +> `optional` **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RichShelf.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/RichShelf.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RichShelf'` + +Defined in: [src/parser/classes/RichShelf.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/RichShelf.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RichShelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RichShelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/RunAttestationCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/RunAttestationCommand.md new file mode 100644 index 00000000..e3f322fb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/RunAttestationCommand.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / RunAttestationCommand + +# Class: RunAttestationCommand + +Defined in: [src/parser/classes/commands/RunAttestationCommand.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/RunAttestationCommand.ts#L15) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new RunAttestationCommand**(`data`): `RunAttestationCommand` + +Defined in: [src/parser/classes/commands/RunAttestationCommand.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/RunAttestationCommand.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`RunAttestationCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### engagement\_type + +> **engagement\_type**: `string` + +Defined in: [src/parser/classes/commands/RunAttestationCommand.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/RunAttestationCommand.ts#L18) + +*** + +### ids? + +> `optional` **ids**: `AttIds`[] + +Defined in: [src/parser/classes/commands/RunAttestationCommand.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/RunAttestationCommand.ts#L19) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'RunAttestationCommand'` + +Defined in: [src/parser/classes/commands/RunAttestationCommand.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/RunAttestationCommand.ts#L16) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is RunAttestationCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is RunAttestationCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchBox.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchBox.md new file mode 100644 index 00000000..886dad12 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchBox.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchBox + +# Class: SearchBox + +Defined in: [src/parser/classes/SearchBox.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchBox.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SearchBox**(`data`): `SearchBox` + +Defined in: [src/parser/classes/SearchBox.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchBox.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SearchBox` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### clear\_button + +> **clear\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/SearchBox.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchBox.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SearchBox.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchBox.ts#L10) + +*** + +### placeholder\_text + +> **placeholder\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SearchBox.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchBox.ts#L13) + +*** + +### search\_button + +> **search\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/SearchBox.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchBox.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SearchBox'` + +Defined in: [src/parser/classes/SearchBox.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchBox.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SearchBox & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SearchBox & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchEndpoint.md new file mode 100644 index 00000000..eda7faa3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchEndpoint + +# Class: SearchEndpoint + +Defined in: [src/parser/classes/endpoints/SearchEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SearchEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`SearchRequest`](../../../../type-aliases/SearchRequest.md)\> + +## Constructors + +### Constructor + +> **new SearchEndpoint**(`data`): `SearchEndpoint` + +Defined in: [src/parser/classes/endpoints/SearchEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SearchEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SearchEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SearchEndpoint'` + +Defined in: [src/parser/classes/endpoints/SearchEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SearchEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`SearchRequest`](../../../../type-aliases/SearchRequest.md) + +Defined in: [src/parser/classes/endpoints/SearchEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SearchEndpoint.ts#L20) + +#### Returns + +[`SearchRequest`](../../../../type-aliases/SearchRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/SearchEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SearchEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SearchEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SearchEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilter.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilter.md new file mode 100644 index 00000000..c065b6eb --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilter.md @@ -0,0 +1,275 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchFilter + +# Class: SearchFilter + +Defined in: [src/parser/classes/SearchFilter.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SearchFilter**(`data`): `SearchFilter` + +Defined in: [src/parser/classes/SearchFilter.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SearchFilter` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SearchFilter.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L10) + +*** + +### label + +> **label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SearchFilter.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L9) + +*** + +### status? + +> `optional` **status**: `string` + +Defined in: [src/parser/classes/SearchFilter.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L12) + +*** + +### tooltip + +> **tooltip**: `string` + +Defined in: [src/parser/classes/SearchFilter.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SearchFilter'` + +Defined in: [src/parser/classes/SearchFilter.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### disabled + +#### Get Signature + +> **get** **disabled**(): `boolean` + +Defined in: [src/parser/classes/SearchFilter.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L25) + +##### Returns + +`boolean` + +*** + +### selected + +#### Get Signature + +> **get** **selected**(): `boolean` + +Defined in: [src/parser/classes/SearchFilter.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilter.ts#L29) + +##### Returns + +`boolean` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SearchFilter & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SearchFilter & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SearchFilterGroup.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilterGroup.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/SearchFilterGroup.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilterGroup.md index 4e1541cf..1f5adee1 100644 --- a/docs/api/namespaces/YTNodes/classes/SearchFilterGroup.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilterGroup.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SearchFilterGroup +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchFilterGroup # Class: SearchFilterGroup +Defined in: [src/parser/classes/SearchFilterGroup.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterGroup.ts#L7) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SearchFilterGroup() +### Constructor -> **new SearchFilterGroup**(`data`): [`SearchFilterGroup`](SearchFilterGroup.md) +> **new SearchFilterGroup**(`data`): `SearchFilterGroup` + +Defined in: [src/parser/classes/SearchFilterGroup.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterGroup.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SearchFilterGroup`](SearchFilterGroup.md) +`SearchFilterGroup` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SearchFilterGroup.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchFilterGroup.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **filters**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SearchFilter`](SearchFilter.md)\> -#### Defined in - -[src/parser/classes/SearchFilterGroup.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchFilterGroup.ts#L11) +Defined in: [src/parser/classes/SearchFilterGroup.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterGroup.ts#L11) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/SearchFilterGroup.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchFilterGroup.ts#L10) +Defined in: [src/parser/classes/SearchFilterGroup.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterGroup.ts#L10) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SearchFilterGroup'` +Defined in: [src/parser/classes/SearchFilterGroup.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterGroup.ts#L8) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SearchFilterGroup.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchFilterGroup.ts#L8) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SearchFilterGroup & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilterOptionsDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilterOptionsDialog.md new file mode 100644 index 00000000..8356dcca --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchFilterOptionsDialog.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchFilterOptionsDialog + +# Class: SearchFilterOptionsDialog + +Defined in: [src/parser/classes/SearchFilterOptionsDialog.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterOptionsDialog.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SearchFilterOptionsDialog**(`data`): `SearchFilterOptionsDialog` + +Defined in: [src/parser/classes/SearchFilterOptionsDialog.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterOptionsDialog.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SearchFilterOptionsDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### groups + +> **groups**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SearchFilterGroup`](SearchFilterGroup.md)\> + +Defined in: [src/parser/classes/SearchFilterOptionsDialog.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterOptionsDialog.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SearchFilterOptionsDialog.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterOptionsDialog.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SearchFilterOptionsDialog'` + +Defined in: [src/parser/classes/SearchFilterOptionsDialog.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchFilterOptionsDialog.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SearchFilterOptionsDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SearchFilterOptionsDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchHeader.md new file mode 100644 index 00000000..1b04e00d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchHeader.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchHeader + +# Class: SearchHeader + +Defined in: [src/parser/classes/SearchHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchHeader.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SearchHeader**(`data`): `SearchHeader` + +Defined in: [src/parser/classes/SearchHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchHeader.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SearchHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### chip\_bar + +> **chip\_bar**: [`ChipCloud`](ChipCloud.md) \| `null` + +Defined in: [src/parser/classes/SearchHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchHeader.ts#L9) + +*** + +### search\_filter\_button + +> **search\_filter\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/SearchHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchHeader.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SearchHeader'` + +Defined in: [src/parser/classes/SearchHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchHeader.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SearchHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SearchHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchRefinementCard.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchRefinementCard.md new file mode 100644 index 00000000..415b664d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchRefinementCard.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchRefinementCard + +# Class: SearchRefinementCard + +Defined in: [src/parser/classes/SearchRefinementCard.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchRefinementCard.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SearchRefinementCard**(`data`): `SearchRefinementCard` + +Defined in: [src/parser/classes/SearchRefinementCard.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchRefinementCard.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SearchRefinementCard` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SearchRefinementCard.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchRefinementCard.ts#L11) + +*** + +### query + +> **query**: `string` + +Defined in: [src/parser/classes/SearchRefinementCard.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchRefinementCard.ts#L12) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/SearchRefinementCard.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchRefinementCard.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SearchRefinementCard'` + +Defined in: [src/parser/classes/SearchRefinementCard.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchRefinementCard.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SearchRefinementCard & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SearchRefinementCard & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSubMenu.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSubMenu.md new file mode 100644 index 00000000..25b030a4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSubMenu.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchSubMenu + +# Class: SearchSubMenu + +Defined in: [src/parser/classes/SearchSubMenu.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSubMenu.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SearchSubMenu**(`data`): `SearchSubMenu` + +Defined in: [src/parser/classes/SearchSubMenu.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSubMenu.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SearchSubMenu` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button? + +> `optional` **button**: [`ToggleButton`](ToggleButton.md) \| `null` + +Defined in: [src/parser/classes/SearchSubMenu.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSubMenu.ts#L13) + +*** + +### groups? + +> `optional` **groups**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SearchFilterGroup`](SearchFilterGroup.md)\> + +Defined in: [src/parser/classes/SearchSubMenu.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSubMenu.ts#L12) + +*** + +### title? + +> `optional` **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SearchSubMenu.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSubMenu.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SearchSubMenu'` + +Defined in: [src/parser/classes/SearchSubMenu.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSubMenu.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SearchSubMenu & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SearchSubMenu & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSuggestion.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSuggestion.md new file mode 100644 index 00000000..7ea660a7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSuggestion.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchSuggestion + +# Class: SearchSuggestion + +Defined in: [src/parser/classes/SearchSuggestion.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`HistorySuggestion`](HistorySuggestion.md) + +## Constructors + +### Constructor + +> **new SearchSuggestion**(`data`): `SearchSuggestion` + +Defined in: [src/parser/classes/SearchSuggestion.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SearchSuggestion` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SearchSuggestion.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L10) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/SearchSuggestion.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L11) + +*** + +### service\_endpoint? + +> `optional` **service\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SearchSuggestion.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L12) + +*** + +### suggestion + +> **suggestion**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SearchSuggestion.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SearchSuggestion'` + +Defined in: [src/parser/classes/SearchSuggestion.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestion.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SearchSuggestion & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SearchSuggestion & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SearchSuggestionsSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSuggestionsSection.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/SearchSuggestionsSection.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSuggestionsSection.md index 07a5b8f6..3f8a4516 100644 --- a/docs/api/namespaces/YTNodes/classes/SearchSuggestionsSection.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SearchSuggestionsSection.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SearchSuggestionsSection +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SearchSuggestionsSection # Class: SearchSuggestionsSection +Defined in: [src/parser/classes/SearchSuggestionsSection.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestionsSection.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SearchSuggestionsSection() +### Constructor -> **new SearchSuggestionsSection**(`data`): [`SearchSuggestionsSection`](SearchSuggestionsSection.md) +> **new SearchSuggestionsSection**(`data`): `SearchSuggestionsSection` + +Defined in: [src/parser/classes/SearchSuggestionsSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestionsSection.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SearchSuggestionsSection`](SearchSuggestionsSection.md) +`SearchSuggestionsSection` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SearchSuggestionsSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchSuggestionsSection.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/SearchSuggestionsSection.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchSuggestionsSection.ts#L7) +Defined in: [src/parser/classes/SearchSuggestionsSection.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestionsSection.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SearchSuggestionsSection'` +Defined in: [src/parser/classes/SearchSuggestionsSection.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SearchSuggestionsSection.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SearchSuggestionsSection.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SearchSuggestionsSection.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SearchSuggestionsSection & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SecondarySearchContainer.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SecondarySearchContainer.md new file mode 100644 index 00000000..0a9aa034 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SecondarySearchContainer.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SecondarySearchContainer + +# Class: SecondarySearchContainer + +Defined in: [src/parser/classes/SecondarySearchContainer.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SecondarySearchContainer.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SecondarySearchContainer**(`data`): `SecondarySearchContainer` + +Defined in: [src/parser/classes/SecondarySearchContainer.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SecondarySearchContainer.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SecondarySearchContainer` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`UniversalWatchCard`](UniversalWatchCard.md)\> + +Defined in: [src/parser/classes/SecondarySearchContainer.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SecondarySearchContainer.ts#L9) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/SecondarySearchContainer.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SecondarySearchContainer.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SecondarySearchContainer'` + +Defined in: [src/parser/classes/SecondarySearchContainer.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SecondarySearchContainer.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SecondarySearchContainer & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SecondarySearchContainer & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SectionHeaderView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SectionHeaderView.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/SectionHeaderView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SectionHeaderView.md index def53663..75017f47 100644 --- a/docs/api/namespaces/YTNodes/classes/SectionHeaderView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SectionHeaderView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SectionHeaderView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SectionHeaderView # Class: SectionHeaderView +Defined in: [src/parser/classes/SectionHeaderView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionHeaderView.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SectionHeaderView() +### Constructor -> **new SectionHeaderView**(`data`): [`SectionHeaderView`](SectionHeaderView.md) +> **new SectionHeaderView**(`data`): `SectionHeaderView` + +Defined in: [src/parser/classes/SectionHeaderView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionHeaderView.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SectionHeaderView`](SectionHeaderView.md) +`SectionHeaderView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SectionHeaderView.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SectionHeaderView.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **headline**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/SectionHeaderView.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SectionHeaderView.ts#L8) +Defined in: [src/parser/classes/SectionHeaderView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionHeaderView.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SectionHeaderView'` +Defined in: [src/parser/classes/SectionHeaderView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionHeaderView.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SectionHeaderView.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SectionHeaderView.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SectionHeaderView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SectionList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SectionList.md new file mode 100644 index 00000000..292c9a20 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SectionList.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SectionList + +# Class: SectionList + +Defined in: [src/parser/classes/SectionList.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionList.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SectionList**(`data`): `SectionList` + +Defined in: [src/parser/classes/SectionList.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionList.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SectionList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents + +> **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/SectionList.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionList.ts#L7) + +*** + +### continuation? + +> `optional` **continuation**: `string` + +Defined in: [src/parser/classes/SectionList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionList.ts#L9) + +*** + +### header? + +> `optional` **header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/SectionList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionList.ts#L10) + +*** + +### sub\_menu? + +> `optional` **sub\_menu**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/SectionList.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionList.ts#L11) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/SectionList.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionList.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SectionList'` + +Defined in: [src/parser/classes/SectionList.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SectionList.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SectionList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SectionList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SegmentedLikeDislikeButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SegmentedLikeDislikeButton.md new file mode 100644 index 00000000..b35f7426 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SegmentedLikeDislikeButton.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SegmentedLikeDislikeButton + +# Class: SegmentedLikeDislikeButton + +Defined in: [src/parser/classes/SegmentedLikeDislikeButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButton.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SegmentedLikeDislikeButton**(`data`): `SegmentedLikeDislikeButton` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButton.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SegmentedLikeDislikeButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### dislike\_button + +> **dislike\_button**: [`Button`](Button.md) \| [`ToggleButton`](ToggleButton.md) \| `null` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButton.ts#L11) + +*** + +### like\_button + +> **like\_button**: [`Button`](Button.md) \| [`ToggleButton`](ToggleButton.md) \| `null` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButton.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SegmentedLikeDislikeButton'` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButton.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SegmentedLikeDislikeButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SegmentedLikeDislikeButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SegmentedLikeDislikeButtonView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SegmentedLikeDislikeButtonView.md new file mode 100644 index 00000000..4d238b46 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SegmentedLikeDislikeButtonView.md @@ -0,0 +1,291 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SegmentedLikeDislikeButtonView + +# Class: SegmentedLikeDislikeButtonView + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SegmentedLikeDislikeButtonView**(`data`): `SegmentedLikeDislikeButtonView` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L25) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SegmentedLikeDislikeButtonView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### dislike\_button + +> **dislike\_button**: [`DislikeButtonView`](DislikeButtonView.md) \| `null` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L10) + +*** + +### dynamic\_like\_count\_update\_data + +> **dynamic\_like\_count\_update\_data**: `object` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L15) + +#### placeholder\_like\_count\_values\_key + +> **placeholder\_like\_count\_values\_key**: `string` + +#### update\_delay\_loop\_id + +> **update\_delay\_loop\_id**: `string` + +#### update\_delay\_sec + +> **update\_delay\_sec**: `number` + +#### update\_status\_key + +> **update\_status\_key**: `string` + +*** + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L11) + +*** + +### like\_button + +> **like\_button**: [`LikeButtonView`](LikeButtonView.md) \| `null` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L9) + +*** + +### like\_count? + +> `optional` **like\_count**: `number` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L22) + +*** + +### like\_count\_entity + +> **like\_count\_entity**: `object` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L12) + +#### key + +> **key**: `string` + +*** + +### short\_like\_count? + +> `optional` **short\_like\_count**: `string` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L23) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SegmentedLikeDislikeButtonView'` + +Defined in: [src/parser/classes/SegmentedLikeDislikeButtonView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SegmentedLikeDislikeButtonView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SegmentedLikeDislikeButtonView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SegmentedLikeDislikeButtonView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SendFeedbackAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SendFeedbackAction.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/SendFeedbackAction.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SendFeedbackAction.md index 6740c03c..2ee0da3a 100644 --- a/docs/api/namespaces/YTNodes/classes/SendFeedbackAction.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SendFeedbackAction.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SendFeedbackAction +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SendFeedbackAction # Class: SendFeedbackAction +Defined in: [src/parser/classes/actions/SendFeedbackAction.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/SendFeedbackAction.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SendFeedbackAction() +### Constructor -> **new SendFeedbackAction**(`data`): [`SendFeedbackAction`](SendFeedbackAction.md) +> **new SendFeedbackAction**(`data`): `SendFeedbackAction` + +Defined in: [src/parser/classes/actions/SendFeedbackAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/SendFeedbackAction.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SendFeedbackAction`](SendFeedbackAction.md) +`SendFeedbackAction` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/actions/SendFeedbackAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/actions/SendFeedbackAction.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **bucket**: `string` -#### Defined in - -[src/parser/classes/actions/SendFeedbackAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/actions/SendFeedbackAction.ts#L7) +Defined in: [src/parser/classes/actions/SendFeedbackAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/SendFeedbackAction.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SendFeedbackAction'` +Defined in: [src/parser/classes/actions/SendFeedbackAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/SendFeedbackAction.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/actions/SendFeedbackAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/actions/SendFeedbackAction.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SendFeedbackAction & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingBoolean.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingBoolean.md new file mode 100644 index 00000000..4e0a8921 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingBoolean.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SettingBoolean + +# Class: SettingBoolean + +Defined in: [src/parser/classes/SettingBoolean.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingBoolean.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SettingBoolean**(`data`): `SettingBoolean` + +Defined in: [src/parser/classes/SettingBoolean.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingBoolean.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SettingBoolean` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### disable\_endpoint? + +> `optional` **disable\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SettingBoolean.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingBoolean.ts#L12) + +*** + +### enable\_endpoint? + +> `optional` **enable\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SettingBoolean.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingBoolean.ts#L11) + +*** + +### item\_id + +> **item\_id**: `string` + +Defined in: [src/parser/classes/SettingBoolean.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingBoolean.ts#L13) + +*** + +### summary? + +> `optional` **summary**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SettingBoolean.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingBoolean.ts#L10) + +*** + +### title? + +> `optional` **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SettingBoolean.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingBoolean.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SettingBoolean'` + +Defined in: [src/parser/classes/SettingBoolean.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingBoolean.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SettingBoolean & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SettingBoolean & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsCheckbox.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsCheckbox.md new file mode 100644 index 00000000..02282a83 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsCheckbox.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SettingsCheckbox + +# Class: SettingsCheckbox + +Defined in: [src/parser/classes/SettingsCheckbox.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsCheckbox.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SettingsCheckbox**(`data`): `SettingsCheckbox` + +Defined in: [src/parser/classes/SettingsCheckbox.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsCheckbox.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SettingsCheckbox` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### disabled + +> **disabled**: `boolean` + +Defined in: [src/parser/classes/SettingsCheckbox.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsCheckbox.ts#L11) + +*** + +### enabled + +> **enabled**: `boolean` + +Defined in: [src/parser/classes/SettingsCheckbox.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsCheckbox.ts#L10) + +*** + +### help\_text + +> **help\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SettingsCheckbox.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsCheckbox.ts#L9) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/SettingsCheckbox.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsCheckbox.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SettingsCheckbox.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsCheckbox.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SettingsCheckbox'` + +Defined in: [src/parser/classes/SettingsCheckbox.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsCheckbox.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SettingsCheckbox & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SettingsCheckbox & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SettingsOptions.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsOptions.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/SettingsOptions.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsOptions.md index c67228eb..7e2a69f5 100644 --- a/docs/api/namespaces/YTNodes/classes/SettingsOptions.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsOptions.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SettingsOptions +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SettingsOptions # Class: SettingsOptions +Defined in: [src/parser/classes/SettingsOptions.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsOptions.ts#L10) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SettingsOptions() +### Constructor -> **new SettingsOptions**(`data`): [`SettingsOptions`](SettingsOptions.md) +> **new SettingsOptions**(`data`): `SettingsOptions` + +Defined in: [src/parser/classes/SettingsOptions.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsOptions.ts#L17) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SettingsOptions`](SettingsOptions.md) +`SettingsOptions` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SettingsOptions.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SettingsOptions.ts#L17) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > `optional` **options**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Dropdown`](Dropdown.md) \| [`ChannelOptions`](ChannelOptions.md) \| [`CopyLink`](CopyLink.md) \| [`SettingsCheckbox`](SettingsCheckbox.md) \| [`SettingsSwitch`](SettingsSwitch.md)\> -#### Defined in - -[src/parser/classes/SettingsOptions.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SettingsOptions.ts#L15) +Defined in: [src/parser/classes/SettingsOptions.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsOptions.ts#L15) *** @@ -44,9 +44,7 @@ > `optional` **text**: `string` -#### Defined in - -[src/parser/classes/SettingsOptions.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SettingsOptions.ts#L14) +Defined in: [src/parser/classes/SettingsOptions.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsOptions.ts#L14) *** @@ -54,9 +52,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/SettingsOptions.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SettingsOptions.ts#L13) +Defined in: [src/parser/classes/SettingsOptions.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsOptions.ts#L13) *** @@ -64,45 +60,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SettingsOptions'` +Defined in: [src/parser/classes/SettingsOptions.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsOptions.ts#L11) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SettingsOptions.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SettingsOptions.ts#L11) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -120,27 +120,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SettingsOptions & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -154,27 +158,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -188,27 +196,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -225,7 +237,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsSidebar.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsSidebar.md new file mode 100644 index 00000000..22109d02 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsSidebar.md @@ -0,0 +1,245 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SettingsSidebar + +# Class: SettingsSidebar + +Defined in: [src/parser/classes/SettingsSidebar.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSidebar.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SettingsSidebar**(`data`): `SettingsSidebar` + +Defined in: [src/parser/classes/SettingsSidebar.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSidebar.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SettingsSidebar` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactLink`](CompactLink.md)\> + +Defined in: [src/parser/classes/SettingsSidebar.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSidebar.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SettingsSidebar.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSidebar.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SettingsSidebar'` + +Defined in: [src/parser/classes/SettingsSidebar.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSidebar.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactLink`](CompactLink.md)\> + +Defined in: [src/parser/classes/SettingsSidebar.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSidebar.ts#L19) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CompactLink`](CompactLink.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SettingsSidebar & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SettingsSidebar & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsSwitch.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsSwitch.md new file mode 100644 index 00000000..29f85942 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SettingsSwitch.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SettingsSwitch + +# Class: SettingsSwitch + +Defined in: [src/parser/classes/SettingsSwitch.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSwitch.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SettingsSwitch**(`data`): `SettingsSwitch` + +Defined in: [src/parser/classes/SettingsSwitch.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSwitch.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SettingsSwitch` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### disable\_endpoint + +> **disable\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SettingsSwitch.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSwitch.ts#L13) + +*** + +### enable\_endpoint + +> **enable\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SettingsSwitch.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSwitch.ts#L12) + +*** + +### enabled + +> **enabled**: `boolean` + +Defined in: [src/parser/classes/SettingsSwitch.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSwitch.ts#L11) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SettingsSwitch.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSwitch.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SettingsSwitch.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSwitch.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SettingsSwitch'` + +Defined in: [src/parser/classes/SettingsSwitch.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SettingsSwitch.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SettingsSwitch & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SettingsSwitch & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ShareEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEndpoint.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ShareEndpoint.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEndpoint.md index efe6b1c4..2c014366 100644 --- a/docs/api/namespaces/YTNodes/classes/ShareEndpoint.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEndpoint.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ShareEndpoint +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShareEndpoint # Class: ShareEndpoint +Defined in: [src/parser/classes/endpoints/ShareEndpoint.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEndpoint.ts#L4) + ## Extends - [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md) ## Constructors -### new ShareEndpoint() +### Constructor -> **new ShareEndpoint**(`data`): [`ShareEndpoint`](ShareEndpoint.md) +> **new ShareEndpoint**(`data`): `ShareEndpoint` + +Defined in: [src/parser/classes/endpoints/ShareEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEndpoint.ts#L7) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ShareEndpoint`](ShareEndpoint.md) +`ShareEndpoint` #### Overrides -[`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`constructor`](ShareEntityServiceEndpoint.md#constructors) - -#### Defined in - -[src/parser/classes/endpoints/ShareEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/ShareEndpoint.ts#L7) +[`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`constructor`](ShareEntityServiceEndpoint.md#constructor) ## Properties @@ -34,45 +36,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`type`](ShareEntityServiceEndpoint.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### type > `static` **type**: `string` = `'ShareEndpoint'` +Defined in: [src/parser/classes/endpoints/ShareEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEndpoint.ts#L5) + #### Overrides [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`type`](ShareEntityServiceEndpoint.md#type-1) -#### Defined in - -[src/parser/classes/endpoints/ShareEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/ShareEndpoint.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -90,34 +96,30 @@ If the node is not of the given type [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`as`](ShareEntityServiceEndpoint.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### buildRequest() -> **buildRequest**(): [`ShareEntityServiceRequest`](../../APIResponseTypes/type-aliases/ShareEntityServiceRequest.md) +> **buildRequest**(): [`ShareEntityServiceRequest`](../../../../type-aliases/ShareEntityServiceRequest.md) + +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L20) #### Returns -[`ShareEntityServiceRequest`](../../APIResponseTypes/type-aliases/ShareEntityServiceRequest.md) +[`ShareEntityServiceRequest`](../../../../type-aliases/ShareEntityServiceRequest.md) #### Inherited from [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`buildRequest`](ShareEntityServiceEndpoint.md#buildrequest) -#### Defined in - -[src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L20) - *** ### getApiPath() > **getApiPath**(): `string` +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L16) + #### Returns `string` @@ -126,27 +128,31 @@ If the node is not of the given type [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`getApiPath`](ShareEntityServiceEndpoint.md#getapipath) -#### Defined in - -[src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L16) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ShareEndpoint & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -160,27 +166,31 @@ Whether the node has the key [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`hasKey`](ShareEntityServiceEndpoint.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -194,27 +204,31 @@ whether the node is of the given type [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`is`](ShareEntityServiceEndpoint.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -231,7 +245,3 @@ If the node does not have the key #### Inherited from [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`key`](ShareEntityServiceEndpoint.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/namespaces/YTNodes/classes/ShareEntityEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEntityEndpoint.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ShareEntityEndpoint.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEntityEndpoint.md index fb37e1af..9dcb51ee 100644 --- a/docs/api/namespaces/YTNodes/classes/ShareEntityEndpoint.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEntityEndpoint.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ShareEntityEndpoint +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShareEntityEndpoint # Class: ShareEntityEndpoint +Defined in: [src/parser/classes/endpoints/ShareEntityEndpoint.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityEndpoint.ts#L4) + ## Extends - [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md) ## Constructors -### new ShareEntityEndpoint() +### Constructor -> **new ShareEntityEndpoint**(`data`): [`ShareEntityEndpoint`](ShareEntityEndpoint.md) +> **new ShareEntityEndpoint**(`data`): `ShareEntityEndpoint` + +Defined in: [src/parser/classes/endpoints/ShareEntityEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityEndpoint.ts#L7) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ShareEntityEndpoint`](ShareEntityEndpoint.md) +`ShareEntityEndpoint` #### Overrides -[`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`constructor`](ShareEntityServiceEndpoint.md#constructors) - -#### Defined in - -[src/parser/classes/endpoints/ShareEntityEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/ShareEntityEndpoint.ts#L7) +[`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`constructor`](ShareEntityServiceEndpoint.md#constructor) ## Properties @@ -34,45 +36,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`type`](ShareEntityServiceEndpoint.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### type > `static` **type**: `string` = `'ShareEntityEndpoint'` +Defined in: [src/parser/classes/endpoints/ShareEntityEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityEndpoint.ts#L5) + #### Overrides [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`type`](ShareEntityServiceEndpoint.md#type-1) -#### Defined in - -[src/parser/classes/endpoints/ShareEntityEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/ShareEntityEndpoint.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -90,34 +96,30 @@ If the node is not of the given type [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`as`](ShareEntityServiceEndpoint.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### buildRequest() -> **buildRequest**(): [`ShareEntityServiceRequest`](../../APIResponseTypes/type-aliases/ShareEntityServiceRequest.md) +> **buildRequest**(): [`ShareEntityServiceRequest`](../../../../type-aliases/ShareEntityServiceRequest.md) + +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L20) #### Returns -[`ShareEntityServiceRequest`](../../APIResponseTypes/type-aliases/ShareEntityServiceRequest.md) +[`ShareEntityServiceRequest`](../../../../type-aliases/ShareEntityServiceRequest.md) #### Inherited from [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`buildRequest`](ShareEntityServiceEndpoint.md#buildrequest) -#### Defined in - -[src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L20) - *** ### getApiPath() > **getApiPath**(): `string` +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L16) + #### Returns `string` @@ -126,27 +128,31 @@ If the node is not of the given type [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`getApiPath`](ShareEntityServiceEndpoint.md#getapipath) -#### Defined in - -[src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L16) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ShareEntityEndpoint & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -160,27 +166,31 @@ Whether the node has the key [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`hasKey`](ShareEntityServiceEndpoint.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -194,27 +204,31 @@ whether the node is of the given type [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`is`](ShareEntityServiceEndpoint.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -231,7 +245,3 @@ If the node does not have the key #### Inherited from [`ShareEntityServiceEndpoint`](ShareEntityServiceEndpoint.md).[`key`](ShareEntityServiceEndpoint.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEntityServiceEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEntityServiceEndpoint.md new file mode 100644 index 00000000..470f563c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareEntityServiceEndpoint.md @@ -0,0 +1,256 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShareEntityServiceEndpoint + +# Class: ShareEntityServiceEndpoint + +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`ShareEndpoint`](ShareEndpoint.md) +- [`ShareEntityEndpoint`](ShareEntityEndpoint.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`ShareEntityServiceRequest`](../../../../type-aliases/ShareEntityServiceRequest.md)\> + +## Constructors + +### Constructor + +> **new ShareEntityServiceEndpoint**(`data`): `ShareEntityServiceEndpoint` + +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShareEntityServiceEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShareEntityServiceEndpoint'` + +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`ShareEntityServiceRequest`](../../../../type-aliases/ShareEntityServiceRequest.md) + +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L20) + +#### Returns + +[`ShareEntityServiceRequest`](../../../../type-aliases/ShareEntityServiceRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShareEntityServiceEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShareEntityServiceEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShareEntityServiceEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SharePanelHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SharePanelHeader.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/SharePanelHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SharePanelHeader.md index b9edfdcf..4b886e3f 100644 --- a/docs/api/namespaces/YTNodes/classes/SharePanelHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SharePanelHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SharePanelHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SharePanelHeader # Class: SharePanelHeader +Defined in: [src/parser/classes/SharePanelHeader.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharePanelHeader.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SharePanelHeader() +### Constructor -> **new SharePanelHeader**(`data`): [`SharePanelHeader`](SharePanelHeader.md) +> **new SharePanelHeader**(`data`): `SharePanelHeader` + +Defined in: [src/parser/classes/SharePanelHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharePanelHeader.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SharePanelHeader`](SharePanelHeader.md) +`SharePanelHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SharePanelHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SharePanelHeader.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/SharePanelHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SharePanelHeader.ts#L7) +Defined in: [src/parser/classes/SharePanelHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharePanelHeader.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SharePanelHeader'` +Defined in: [src/parser/classes/SharePanelHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharePanelHeader.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SharePanelHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SharePanelHeader.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SharePanelHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/SharePanelTitleV15.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SharePanelTitleV15.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/SharePanelTitleV15.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SharePanelTitleV15.md index 7a4014d0..c1aedd4e 100644 --- a/docs/api/namespaces/YTNodes/classes/SharePanelTitleV15.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SharePanelTitleV15.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SharePanelTitleV15 +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SharePanelTitleV15 # Class: SharePanelTitleV15 +Defined in: [src/parser/classes/SharePanelTitleV15.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharePanelTitleV15.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SharePanelTitleV15() +### Constructor -> **new SharePanelTitleV15**(`data`): [`SharePanelTitleV15`](SharePanelTitleV15.md) +> **new SharePanelTitleV15**(`data`): `SharePanelTitleV15` + +Defined in: [src/parser/classes/SharePanelTitleV15.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharePanelTitleV15.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SharePanelTitleV15`](SharePanelTitleV15.md) +`SharePanelTitleV15` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SharePanelTitleV15.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SharePanelTitleV15.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/SharePanelTitleV15.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SharePanelTitleV15.ts#L8) +Defined in: [src/parser/classes/SharePanelTitleV15.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharePanelTitleV15.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SharePanelTitleV15'` +Defined in: [src/parser/classes/SharePanelTitleV15.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharePanelTitleV15.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SharePanelTitleV15.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SharePanelTitleV15.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SharePanelTitleV15 & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareTarget.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareTarget.md new file mode 100644 index 00000000..f933be90 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShareTarget.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShareTarget + +# Class: ShareTarget + +Defined in: [src/parser/classes/ShareTarget.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShareTarget.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ShareTarget**(`data`): `ShareTarget` + +Defined in: [src/parser/classes/ShareTarget.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShareTarget.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShareTarget` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ShareTarget.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShareTarget.ts#L9) + +*** + +### service\_name + +> **service\_name**: `string` + +Defined in: [src/parser/classes/ShareTarget.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShareTarget.ts#L10) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/ShareTarget.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShareTarget.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ShareTarget.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShareTarget.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShareTarget'` + +Defined in: [src/parser/classes/ShareTarget.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShareTarget.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShareTarget & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShareTarget & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SharedPost.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SharedPost.md new file mode 100644 index 00000000..3375890f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SharedPost.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SharedPost + +# Class: SharedPost + +Defined in: [src/parser/classes/SharedPost.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L13) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SharedPost**(`data`): `SharedPost` + +Defined in: [src/parser/classes/SharedPost.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SharedPost` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/SharedPost.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L24) + +*** + +### content + +> **content**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SharedPost.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L17) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SharedPost.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L22) + +*** + +### expand\_button + +> **expand\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/SharedPost.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L23) + +*** + +### id + +> **id**: `string` + +Defined in: [src/parser/classes/SharedPost.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L21) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/SharedPost.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L19) + +*** + +### original\_post + +> **original\_post**: [`BackstagePost`](BackstagePost.md) \| [`Post`](Post.md) \| `null` + +Defined in: [src/parser/classes/SharedPost.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L20) + +*** + +### published + +> **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SharedPost.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L18) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/SharedPost.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SharedPost'` + +Defined in: [src/parser/classes/SharedPost.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SharedPost.ts#L14) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SharedPost & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SharedPost & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Shelf.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Shelf.md new file mode 100644 index 00000000..89fcded4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Shelf.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Shelf + +# Class: Shelf + +Defined in: [src/parser/classes/Shelf.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Shelf**(`data`): `Shelf` + +Defined in: [src/parser/classes/Shelf.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L18) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Shelf` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/Shelf.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L12) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Shelf.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L11) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/Shelf.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L13) + +*** + +### menu? + +> `optional` **menu**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/Shelf.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L14) + +*** + +### play\_all\_button? + +> `optional` **play\_all\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/Shelf.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L15) + +*** + +### subtitle? + +> `optional` **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Shelf.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L16) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Shelf.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Shelf'` + +Defined in: [src/parser/classes/Shelf.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Shelf.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Shelf & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Shelf & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShortsLockupView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShortsLockupView.md new file mode 100644 index 00000000..a7c2c8af --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShortsLockupView.md @@ -0,0 +1,303 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShortsLockupView + +# Class: ShortsLockupView + +Defined in: [src/parser/classes/ShortsLockupView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ShortsLockupView**(`data`): `ShortsLockupView` + +Defined in: [src/parser/classes/ShortsLockupView.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L26) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShortsLockupView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility\_text + +> **accessibility\_text**: `string` + +Defined in: [src/parser/classes/ShortsLockupView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L13) + +*** + +### badge? + +> `optional` **badge**: [`BadgeView`](BadgeView.md) \| `null` + +Defined in: [src/parser/classes/ShortsLockupView.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L24) + +*** + +### entity\_id + +> **entity\_id**: `string` + +Defined in: [src/parser/classes/ShortsLockupView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L12) + +*** + +### index\_in\_collection + +> **index\_in\_collection**: `number` + +Defined in: [src/parser/classes/ShortsLockupView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L17) + +*** + +### inline\_player\_data? + +> `optional` **inline\_player\_data**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ShortsLockupView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L23) + +*** + +### menu\_on\_tap + +> **menu\_on\_tap**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ShortsLockupView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L16) + +*** + +### menu\_on\_tap\_a11y\_label + +> **menu\_on\_tap\_a11y\_label**: `string` + +Defined in: [src/parser/classes/ShortsLockupView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L18) + +*** + +### on\_tap\_endpoint + +> **on\_tap\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ShortsLockupView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L15) + +*** + +### overlay\_metadata + +> **overlay\_metadata**: `object` + +Defined in: [src/parser/classes/ShortsLockupView.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L19) + +#### primary\_text? + +> `optional` **primary\_text**: [`Text`](../../Misc/classes/Text.md) + +#### secondary\_text? + +> `optional` **secondary\_text**: [`Text`](../../Misc/classes/Text.md) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ShortsLockupView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShortsLockupView'` + +Defined in: [src/parser/classes/ShortsLockupView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShortsLockupView.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShortsLockupView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShortsLockupView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ShowCustomThumbnail.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowCustomThumbnail.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/ShowCustomThumbnail.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ShowCustomThumbnail.md index 9645b118..fca7aa47 100644 --- a/docs/api/namespaces/YTNodes/classes/ShowCustomThumbnail.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowCustomThumbnail.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ShowCustomThumbnail +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShowCustomThumbnail # Class: ShowCustomThumbnail +Defined in: [src/parser/classes/ShowCustomThumbnail.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowCustomThumbnail.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ShowCustomThumbnail() +### Constructor -> **new ShowCustomThumbnail**(`data`): [`ShowCustomThumbnail`](ShowCustomThumbnail.md) +> **new ShowCustomThumbnail**(`data`): `ShowCustomThumbnail` + +Defined in: [src/parser/classes/ShowCustomThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowCustomThumbnail.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ShowCustomThumbnail`](ShowCustomThumbnail.md) +`ShowCustomThumbnail` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ShowCustomThumbnail.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ShowCustomThumbnail.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/ShowCustomThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ShowCustomThumbnail.ts#L8) +Defined in: [src/parser/classes/ShowCustomThumbnail.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowCustomThumbnail.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ShowCustomThumbnail'` +Defined in: [src/parser/classes/ShowCustomThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowCustomThumbnail.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ShowCustomThumbnail.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ShowCustomThumbnail.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ShowCustomThumbnail & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowDialogCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowDialogCommand.md new file mode 100644 index 00000000..060903c0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowDialogCommand.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShowDialogCommand + +# Class: ShowDialogCommand + +Defined in: [src/parser/classes/commands/ShowDialogCommand.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ShowDialogCommand.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ShowDialogCommand**(`data`): `ShowDialogCommand` + +Defined in: [src/parser/classes/commands/ShowDialogCommand.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ShowDialogCommand.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShowDialogCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### inline\_content + +> **inline\_content**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/commands/ShowDialogCommand.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ShowDialogCommand.ts#L7) + +*** + +### remove\_default\_padding + +> **remove\_default\_padding**: `boolean` + +Defined in: [src/parser/classes/commands/ShowDialogCommand.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ShowDialogCommand.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShowDialogCommand'` + +Defined in: [src/parser/classes/commands/ShowDialogCommand.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/ShowDialogCommand.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShowDialogCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShowDialogCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowEngagementPanelEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowEngagementPanelEndpoint.md new file mode 100644 index 00000000..27afb16b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowEngagementPanelEndpoint.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShowEngagementPanelEndpoint + +# Class: ShowEngagementPanelEndpoint + +Defined in: [src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ShowEngagementPanelEndpoint**(`data`): `ShowEngagementPanelEndpoint` + +Defined in: [src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShowEngagementPanelEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### panel\_identifier + +> **panel\_identifier**: `string` + +Defined in: [src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts#L7) + +*** + +### source\_panel\_identifier? + +> `optional` **source\_panel\_identifier**: `string` + +Defined in: [src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShowEngagementPanelEndpoint'` + +Defined in: [src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/ShowEngagementPanelEndpoint.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShowEngagementPanelEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShowEngagementPanelEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatActionPanelAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatActionPanelAction.md new file mode 100644 index 00000000..8fd31744 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatActionPanelAction.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShowLiveChatActionPanelAction + +# Class: ShowLiveChatActionPanelAction + +Defined in: [src/parser/classes/livechat/ShowLiveChatActionPanelAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatActionPanelAction.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ShowLiveChatActionPanelAction**(`data`): `ShowLiveChatActionPanelAction` + +Defined in: [src/parser/classes/livechat/ShowLiveChatActionPanelAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatActionPanelAction.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShowLiveChatActionPanelAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### panel\_to\_show + +> **panel\_to\_show**: [`LiveChatActionPanel`](LiveChatActionPanel.md) \| `null` + +Defined in: [src/parser/classes/livechat/ShowLiveChatActionPanelAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatActionPanelAction.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShowLiveChatActionPanelAction'` + +Defined in: [src/parser/classes/livechat/ShowLiveChatActionPanelAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatActionPanelAction.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShowLiveChatActionPanelAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShowLiveChatActionPanelAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatDialogAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatDialogAction.md new file mode 100644 index 00000000..5b0b7204 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatDialogAction.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShowLiveChatDialogAction + +# Class: ShowLiveChatDialogAction + +Defined in: [src/parser/classes/livechat/ShowLiveChatDialogAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatDialogAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ShowLiveChatDialogAction**(`data`): `ShowLiveChatDialogAction` + +Defined in: [src/parser/classes/livechat/ShowLiveChatDialogAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatDialogAction.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShowLiveChatDialogAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### dialog + +> **dialog**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/ShowLiveChatDialogAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatDialogAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShowLiveChatDialogAction'` + +Defined in: [src/parser/classes/livechat/ShowLiveChatDialogAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatDialogAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShowLiveChatDialogAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShowLiveChatDialogAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatTooltipCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatTooltipCommand.md new file mode 100644 index 00000000..ec7d255f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowLiveChatTooltipCommand.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShowLiveChatTooltipCommand + +# Class: ShowLiveChatTooltipCommand + +Defined in: [src/parser/classes/livechat/ShowLiveChatTooltipCommand.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatTooltipCommand.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ShowLiveChatTooltipCommand**(`data`): `ShowLiveChatTooltipCommand` + +Defined in: [src/parser/classes/livechat/ShowLiveChatTooltipCommand.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatTooltipCommand.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShowLiveChatTooltipCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### tooltip + +> **tooltip**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/ShowLiveChatTooltipCommand.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatTooltipCommand.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShowLiveChatTooltipCommand'` + +Defined in: [src/parser/classes/livechat/ShowLiveChatTooltipCommand.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/ShowLiveChatTooltipCommand.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShowLiveChatTooltipCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShowLiveChatTooltipCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowingResultsFor.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowingResultsFor.md new file mode 100644 index 00000000..f1336800 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ShowingResultsFor.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ShowingResultsFor + +# Class: ShowingResultsFor + +Defined in: [src/parser/classes/ShowingResultsFor.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ShowingResultsFor**(`data`): `ShowingResultsFor` + +Defined in: [src/parser/classes/ShowingResultsFor.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ShowingResultsFor` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### corrected\_query + +> **corrected\_query**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ShowingResultsFor.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L9) + +*** + +### corrected\_query\_endpoint + +> **corrected\_query\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ShowingResultsFor.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L11) + +*** + +### original\_query + +> **original\_query**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ShowingResultsFor.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L10) + +*** + +### original\_query\_endpoint + +> **original\_query\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ShowingResultsFor.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L12) + +*** + +### search\_instead\_for + +> **search\_instead\_for**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ShowingResultsFor.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L13) + +*** + +### showing\_results\_for + +> **showing\_results\_for**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ShowingResultsFor.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ShowingResultsFor'` + +Defined in: [src/parser/classes/ShowingResultsFor.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ShowingResultsFor.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ShowingResultsFor & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ShowingResultsFor & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SignalAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SignalAction.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/SignalAction.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SignalAction.md index 7450f8fb..55b1e897 100644 --- a/docs/api/namespaces/YTNodes/classes/SignalAction.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SignalAction.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SignalAction +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SignalAction # Class: SignalAction +Defined in: [src/parser/classes/actions/SignalAction.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/SignalAction.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SignalAction() +### Constructor -> **new SignalAction**(`data`): [`SignalAction`](SignalAction.md) +> **new SignalAction**(`data`): `SignalAction` + +Defined in: [src/parser/classes/actions/SignalAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/SignalAction.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SignalAction`](SignalAction.md) +`SignalAction` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/actions/SignalAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/actions/SignalAction.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **signal**: `string` -#### Defined in - -[src/parser/classes/actions/SignalAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/actions/SignalAction.ts#L7) +Defined in: [src/parser/classes/actions/SignalAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/SignalAction.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SignalAction'` +Defined in: [src/parser/classes/actions/SignalAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/SignalAction.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/actions/SignalAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/actions/SignalAction.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SignalAction & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SignalServiceEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SignalServiceEndpoint.md new file mode 100644 index 00000000..fc9d067a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SignalServiceEndpoint.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SignalServiceEndpoint + +# Class: SignalServiceEndpoint + +Defined in: [src/parser/classes/endpoints/SignalServiceEndpoint.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SignalServiceEndpoint.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SignalServiceEndpoint**(`data`): `SignalServiceEndpoint` + +Defined in: [src/parser/classes/endpoints/SignalServiceEndpoint.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SignalServiceEndpoint.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SignalServiceEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### actions? + +> `optional` **actions**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/endpoints/SignalServiceEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SignalServiceEndpoint.ts#L7) + +*** + +### signal? + +> `optional` **signal**: `string` + +Defined in: [src/parser/classes/endpoints/SignalServiceEndpoint.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SignalServiceEndpoint.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SignalServiceEndpoint'` + +Defined in: [src/parser/classes/endpoints/SignalServiceEndpoint.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SignalServiceEndpoint.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SignalServiceEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SignalServiceEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleCardContent.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleCardContent.md new file mode 100644 index 00000000..abe53d70 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleCardContent.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SimpleCardContent + +# Class: SimpleCardContent + +Defined in: [src/parser/classes/SimpleCardContent.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SimpleCardContent**(`data`): `SimpleCardContent` + +Defined in: [src/parser/classes/SimpleCardContent.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SimpleCardContent` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### call\_to\_action + +> **call\_to\_action**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SimpleCardContent.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L14) + +*** + +### display\_domain + +> **display\_domain**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SimpleCardContent.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SimpleCardContent.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L15) + +*** + +### image + +> **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/SimpleCardContent.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L10) + +*** + +### show\_link\_icon + +> **show\_link\_icon**: `boolean` + +Defined in: [src/parser/classes/SimpleCardContent.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SimpleCardContent.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SimpleCardContent'` + +Defined in: [src/parser/classes/SimpleCardContent.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardContent.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SimpleCardContent & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SimpleCardContent & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleCardTeaser.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleCardTeaser.md new file mode 100644 index 00000000..ce5db41d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleCardTeaser.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SimpleCardTeaser + +# Class: SimpleCardTeaser + +Defined in: [src/parser/classes/SimpleCardTeaser.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardTeaser.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SimpleCardTeaser**(`data`): `SimpleCardTeaser` + +Defined in: [src/parser/classes/SimpleCardTeaser.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardTeaser.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SimpleCardTeaser` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### message + +> **message**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SimpleCardTeaser.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardTeaser.ts#L8) + +*** + +### prominent + +> **prominent**: `boolean` + +Defined in: [src/parser/classes/SimpleCardTeaser.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardTeaser.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SimpleCardTeaser'` + +Defined in: [src/parser/classes/SimpleCardTeaser.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleCardTeaser.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SimpleCardTeaser & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SimpleCardTeaser & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleMenuHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleMenuHeader.md new file mode 100644 index 00000000..89eec76d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleMenuHeader.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SimpleMenuHeader + +# Class: SimpleMenuHeader + +Defined in: [src/parser/classes/menus/SimpleMenuHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/SimpleMenuHeader.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SimpleMenuHeader**(`data`): `SimpleMenuHeader` + +Defined in: [src/parser/classes/menus/SimpleMenuHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/SimpleMenuHeader.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SimpleMenuHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### buttons + +> **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Button`](Button.md)\> + +Defined in: [src/parser/classes/menus/SimpleMenuHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/SimpleMenuHeader.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/menus/SimpleMenuHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/SimpleMenuHeader.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SimpleMenuHeader'` + +Defined in: [src/parser/classes/menus/SimpleMenuHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/menus/SimpleMenuHeader.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SimpleMenuHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SimpleMenuHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleTextSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleTextSection.md new file mode 100644 index 00000000..c8bf82bd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SimpleTextSection.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SimpleTextSection + +# Class: SimpleTextSection + +Defined in: [src/parser/classes/SimpleTextSection.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleTextSection.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SimpleTextSection**(`data`): `SimpleTextSection` + +Defined in: [src/parser/classes/SimpleTextSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleTextSection.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SimpleTextSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### lines + +> **lines**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/SimpleTextSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleTextSection.ts#L8) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/SimpleTextSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleTextSection.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SimpleTextSection'` + +Defined in: [src/parser/classes/SimpleTextSection.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SimpleTextSection.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SimpleTextSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SimpleTextSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleActionEmergencySupport.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleActionEmergencySupport.md new file mode 100644 index 00000000..569cf3d0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleActionEmergencySupport.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SingleActionEmergencySupport + +# Class: SingleActionEmergencySupport + +Defined in: [src/parser/classes/SingleActionEmergencySupport.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleActionEmergencySupport.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SingleActionEmergencySupport**(`data`): `SingleActionEmergencySupport` + +Defined in: [src/parser/classes/SingleActionEmergencySupport.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleActionEmergencySupport.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SingleActionEmergencySupport` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### action\_text + +> **action\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SingleActionEmergencySupport.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleActionEmergencySupport.ts#L9) + +*** + +### details + +> **details**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SingleActionEmergencySupport.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleActionEmergencySupport.ts#L11) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SingleActionEmergencySupport.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleActionEmergencySupport.ts#L13) + +*** + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/SingleActionEmergencySupport.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleActionEmergencySupport.ts#L12) + +*** + +### nav\_text + +> **nav\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SingleActionEmergencySupport.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleActionEmergencySupport.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SingleActionEmergencySupport'` + +Defined in: [src/parser/classes/SingleActionEmergencySupport.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleActionEmergencySupport.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SingleActionEmergencySupport & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SingleActionEmergencySupport & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SingleColumnBrowseResults.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleColumnBrowseResults.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/SingleColumnBrowseResults.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SingleColumnBrowseResults.md index 5a1e4487..2c40913e 100644 --- a/docs/api/namespaces/YTNodes/classes/SingleColumnBrowseResults.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleColumnBrowseResults.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SingleColumnBrowseResults +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SingleColumnBrowseResults # Class: SingleColumnBrowseResults +Defined in: [src/parser/classes/SingleColumnBrowseResults.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleColumnBrowseResults.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SingleColumnBrowseResults() +### Constructor -> **new SingleColumnBrowseResults**(`data`): [`SingleColumnBrowseResults`](SingleColumnBrowseResults.md) +> **new SingleColumnBrowseResults**(`data`): `SingleColumnBrowseResults` + +Defined in: [src/parser/classes/SingleColumnBrowseResults.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleColumnBrowseResults.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SingleColumnBrowseResults`](SingleColumnBrowseResults.md) +`SingleColumnBrowseResults` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SingleColumnBrowseResults.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SingleColumnBrowseResults.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **tabs**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Tab`](Tab.md)\> -#### Defined in - -[src/parser/classes/SingleColumnBrowseResults.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SingleColumnBrowseResults.ts#L8) +Defined in: [src/parser/classes/SingleColumnBrowseResults.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleColumnBrowseResults.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SingleColumnBrowseResults'` +Defined in: [src/parser/classes/SingleColumnBrowseResults.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleColumnBrowseResults.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SingleColumnBrowseResults.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SingleColumnBrowseResults.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SingleColumnBrowseResults & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/SingleColumnMusicWatchNextResults.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleColumnMusicWatchNextResults.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/SingleColumnMusicWatchNextResults.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SingleColumnMusicWatchNextResults.md index 11951e60..9bcee590 100644 --- a/docs/api/namespaces/YTNodes/classes/SingleColumnMusicWatchNextResults.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleColumnMusicWatchNextResults.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SingleColumnMusicWatchNextResults +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SingleColumnMusicWatchNextResults # Class: SingleColumnMusicWatchNextResults +Defined in: [src/parser/classes/SingleColumnMusicWatchNextResults.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleColumnMusicWatchNextResults.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SingleColumnMusicWatchNextResults() +### Constructor -> **new SingleColumnMusicWatchNextResults**(`data`): [`SingleColumnMusicWatchNextResults`](SingleColumnMusicWatchNextResults.md) +> **new SingleColumnMusicWatchNextResults**(`data`): `SingleColumnMusicWatchNextResults` + +Defined in: [src/parser/classes/SingleColumnMusicWatchNextResults.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleColumnMusicWatchNextResults.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SingleColumnMusicWatchNextResults`](SingleColumnMusicWatchNextResults.md) +`SingleColumnMusicWatchNextResults` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SingleColumnMusicWatchNextResults.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SingleColumnMusicWatchNextResults.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/SingleColumnMusicWatchNextResults.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SingleColumnMusicWatchNextResults.ts#L7) +Defined in: [src/parser/classes/SingleColumnMusicWatchNextResults.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleColumnMusicWatchNextResults.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SingleColumnMusicWatchNextResults'` +Defined in: [src/parser/classes/SingleColumnMusicWatchNextResults.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleColumnMusicWatchNextResults.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SingleColumnMusicWatchNextResults.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SingleColumnMusicWatchNextResults.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SingleColumnMusicWatchNextResults & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleHeroImage.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleHeroImage.md new file mode 100644 index 00000000..c6d62fad --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SingleHeroImage.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SingleHeroImage + +# Class: SingleHeroImage + +Defined in: [src/parser/classes/SingleHeroImage.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleHeroImage.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SingleHeroImage**(`data`): `SingleHeroImage` + +Defined in: [src/parser/classes/SingleHeroImage.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleHeroImage.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SingleHeroImage` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/SingleHeroImage.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleHeroImage.ts#L9) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/SingleHeroImage.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleHeroImage.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SingleHeroImage'` + +Defined in: [src/parser/classes/SingleHeroImage.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SingleHeroImage.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SingleHeroImage & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SingleHeroImage & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SlimOwner.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SlimOwner.md new file mode 100644 index 00000000..3e02eea0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SlimOwner.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SlimOwner + +# Class: SlimOwner + +Defined in: [src/parser/classes/SlimOwner.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimOwner.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SlimOwner**(`data`): `SlimOwner` + +Defined in: [src/parser/classes/SlimOwner.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimOwner.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SlimOwner` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SlimOwner.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimOwner.ts#L13) + +*** + +### subscribe\_button + +> **subscribe\_button**: [`SubscribeButton`](SubscribeButton.md) \| `null` + +Defined in: [src/parser/classes/SlimOwner.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimOwner.ts#L14) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/SlimOwner.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimOwner.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SlimOwner.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimOwner.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SlimOwner'` + +Defined in: [src/parser/classes/SlimOwner.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimOwner.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SlimOwner & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SlimOwner & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SlimVideoMetadata.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SlimVideoMetadata.md new file mode 100644 index 00000000..7bb685a8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SlimVideoMetadata.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SlimVideoMetadata + +# Class: SlimVideoMetadata + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SlimVideoMetadata**(`data`): `SlimVideoMetadata` + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SlimVideoMetadata` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### collapsed\_subtitle + +> **collapsed\_subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L9) + +*** + +### date + +> **date**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L14) + +*** + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L12) + +*** + +### expanded\_subtitle + +> **expanded\_subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L10) + +*** + +### owner + +> **owner**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L11) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L13) + +*** + +### type + +> `static` **type**: `string` = `'SlimVideoMetadata'` + +Defined in: [src/parser/classes/SlimVideoMetadata.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SlimVideoMetadata.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SlimVideoMetadata & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SlimVideoMetadata & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SortFilterHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SortFilterHeader.md new file mode 100644 index 00000000..8b33ec0a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SortFilterHeader.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SortFilterHeader + +# Class: SortFilterHeader + +Defined in: [src/parser/classes/SortFilterHeader.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterHeader.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SortFilterHeader**(`data`): `SortFilterHeader` + +Defined in: [src/parser/classes/SortFilterHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterHeader.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SortFilterHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### filter\_menu + +> **filter\_menu**: [`SortFilterSubMenu`](SortFilterSubMenu.md) \| `null` + +Defined in: [src/parser/classes/SortFilterHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterHeader.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SortFilterHeader'` + +Defined in: [src/parser/classes/SortFilterHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterHeader.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SortFilterHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SortFilterHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SortFilterSubMenu.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SortFilterSubMenu.md new file mode 100644 index 00000000..316bd52a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SortFilterSubMenu.md @@ -0,0 +1,269 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SortFilterSubMenu + +# Class: SortFilterSubMenu + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L14) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SortFilterSubMenu**(`data`): `SortFilterSubMenu` + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SortFilterSubMenu` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### accessibility? + +> `optional` **accessibility**: `AccessibilitySupportedDatas` + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L21) + +*** + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L18) + +*** + +### sub\_menu\_items? + +> `optional` **sub\_menu\_items**: `SubMenuItem`[] + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L20) + +*** + +### title? + +> `optional` **title**: `string` + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L17) + +*** + +### tooltip? + +> `optional` **tooltip**: `string` + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L19) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SortFilterSubMenu'` + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L15) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### label + +#### Get Signature + +> **get** **label**(): `string` \| `undefined` + +Defined in: [src/parser/classes/SortFilterSubMenu.ts:55](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SortFilterSubMenu.ts#L55) + +##### Returns + +`string` \| `undefined` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SortFilterSubMenu & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SortFilterSubMenu & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SponsorCommentBadge.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SponsorCommentBadge.md new file mode 100644 index 00000000..65e5fbe3 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SponsorCommentBadge.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SponsorCommentBadge + +# Class: SponsorCommentBadge + +Defined in: [src/parser/classes/comments/SponsorCommentBadge.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/SponsorCommentBadge.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SponsorCommentBadge**(`data`): `SponsorCommentBadge` + +Defined in: [src/parser/classes/comments/SponsorCommentBadge.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/SponsorCommentBadge.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SponsorCommentBadge` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### custom\_badge + +> **custom\_badge**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/comments/SponsorCommentBadge.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/SponsorCommentBadge.ts#L8) + +*** + +### tooltip + +> **tooltip**: `string` + +Defined in: [src/parser/classes/comments/SponsorCommentBadge.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/SponsorCommentBadge.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SponsorCommentBadge'` + +Defined in: [src/parser/classes/comments/SponsorCommentBadge.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/SponsorCommentBadge.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SponsorCommentBadge & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SponsorCommentBadge & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/StartAt.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/StartAt.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/StartAt.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/StartAt.md index 33ee38d4..6ba0c2fc 100644 --- a/docs/api/namespaces/YTNodes/classes/StartAt.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/StartAt.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / StartAt +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / StartAt # Class: StartAt +Defined in: [src/parser/classes/StartAt.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StartAt.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new StartAt() +### Constructor -> **new StartAt**(`data`): [`StartAt`](StartAt.md) +> **new StartAt**(`data`): `StartAt` + +Defined in: [src/parser/classes/StartAt.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StartAt.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`StartAt`](StartAt.md) +`StartAt` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/StartAt.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/StartAt.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **start\_at\_option\_label**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/StartAt.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/StartAt.ts#L8) +Defined in: [src/parser/classes/StartAt.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StartAt.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'StartAt'` +Defined in: [src/parser/classes/StartAt.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StartAt.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/StartAt.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/StartAt.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is StartAt & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/StructuredDescriptionContent.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/StructuredDescriptionContent.md similarity index 56% rename from docs/api/namespaces/YTNodes/classes/StructuredDescriptionContent.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/StructuredDescriptionContent.md index bf685fbb..1fd49a38 100644 --- a/docs/api/namespaces/YTNodes/classes/StructuredDescriptionContent.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/StructuredDescriptionContent.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / StructuredDescriptionContent +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / StructuredDescriptionContent # Class: StructuredDescriptionContent +Defined in: [src/parser/classes/StructuredDescriptionContent.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionContent.ts#L14) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new StructuredDescriptionContent() +### Constructor -> **new StructuredDescriptionContent**(`data`): [`StructuredDescriptionContent`](StructuredDescriptionContent.md) +> **new StructuredDescriptionContent**(`data`): `StructuredDescriptionContent` + +Defined in: [src/parser/classes/StructuredDescriptionContent.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionContent.ts#L24) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`StructuredDescriptionContent`](StructuredDescriptionContent.md) +`StructuredDescriptionContent` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/StructuredDescriptionContent.ts:24](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/StructuredDescriptionContent.ts#L24) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReelShelf`](ReelShelf.md) \| [`HorizontalCardList`](HorizontalCardList.md) \| [`ExpandableVideoDescriptionBody`](ExpandableVideoDescriptionBody.md) \| [`VideoDescriptionHeader`](VideoDescriptionHeader.md) \| [`VideoDescriptionInfocardsSection`](VideoDescriptionInfocardsSection.md) \| [`VideoDescriptionMusicSection`](VideoDescriptionMusicSection.md) \| [`VideoDescriptionTranscriptSection`](VideoDescriptionTranscriptSection.md) \| [`VideoDescriptionCourseSection`](VideoDescriptionCourseSection.md) \| [`VideoAttributesSectionView`](VideoAttributesSectionView.md) \| [`HowThisWasMadeSectionView`](HowThisWasMadeSectionView.md)\> -#### Defined in - -[src/parser/classes/StructuredDescriptionContent.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/StructuredDescriptionContent.ts#L17) +Defined in: [src/parser/classes/StructuredDescriptionContent.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionContent.ts#L17) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'StructuredDescriptionContent'` +Defined in: [src/parser/classes/StructuredDescriptionContent.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionContent.ts#L15) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/StructuredDescriptionContent.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/StructuredDescriptionContent.ts#L15) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is StructuredDescriptionContent & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/StructuredDescriptionPlaylistLockup.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/StructuredDescriptionPlaylistLockup.md new file mode 100644 index 00000000..d7fdf594 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/StructuredDescriptionPlaylistLockup.md @@ -0,0 +1,295 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / StructuredDescriptionPlaylistLockup + +# Class: StructuredDescriptionPlaylistLockup + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new StructuredDescriptionPlaylistLockup**(`data`): `StructuredDescriptionPlaylistLockup` + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`StructuredDescriptionPlaylistLockup` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### aspect\_ratio + +> **aspect\_ratio**: `number` + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L16) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L14) + +*** + +### max\_lines\_short\_byline\_text + +> **max\_lines\_short\_byline\_text**: `number` + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L18) + +*** + +### max\_lines\_title + +> **max\_lines\_title**: `number` + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L17) + +*** + +### overlay\_position + +> **overlay\_position**: `string` + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L19) + +*** + +### short\_byline\_text + +> **short\_byline\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L12) + +*** + +### thumbnail + +> **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L10) + +*** + +### thumbnail\_width + +> **thumbnail\_width**: `number` + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L15) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_count\_short\_text + +> **video\_count\_short\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L13) + +*** + +### type + +> `static` **type**: `string` = `'StructuredDescriptionPlaylistLockup'` + +Defined in: [src/parser/classes/StructuredDescriptionPlaylistLockup.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/StructuredDescriptionPlaylistLockup.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is StructuredDescriptionPlaylistLockup & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is StructuredDescriptionPlaylistLockup & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SubFeedOption.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubFeedOption.md new file mode 100644 index 00000000..df1e7718 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubFeedOption.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SubFeedOption + +# Class: SubFeedOption + +Defined in: [src/parser/classes/SubFeedOption.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedOption.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SubFeedOption**(`data`): `SubFeedOption` + +Defined in: [src/parser/classes/SubFeedOption.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedOption.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SubFeedOption` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SubFeedOption.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedOption.ts#L11) + +*** + +### is\_selected + +> **is\_selected**: `boolean` + +Defined in: [src/parser/classes/SubFeedOption.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedOption.ts#L10) + +*** + +### name + +> **name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SubFeedOption.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedOption.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SubFeedOption'` + +Defined in: [src/parser/classes/SubFeedOption.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedOption.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SubFeedOption & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SubFeedOption & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/SubFeedSelector.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubFeedSelector.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/SubFeedSelector.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/SubFeedSelector.md index b528d839..de36c70a 100644 --- a/docs/api/namespaces/YTNodes/classes/SubFeedSelector.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubFeedSelector.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / SubFeedSelector +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SubFeedSelector # Class: SubFeedSelector +Defined in: [src/parser/classes/SubFeedSelector.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedSelector.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new SubFeedSelector() +### Constructor -> **new SubFeedSelector**(`data`): [`SubFeedSelector`](SubFeedSelector.md) +> **new SubFeedSelector**(`data`): `SubFeedSelector` + +Defined in: [src/parser/classes/SubFeedSelector.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedSelector.ts#L12) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`SubFeedSelector`](SubFeedSelector.md) +`SubFeedSelector` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/SubFeedSelector.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SubFeedSelector.ts#L12) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **options**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SubFeedOption`](SubFeedOption.md)\> -#### Defined in - -[src/parser/classes/SubFeedSelector.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SubFeedSelector.ts#L10) +Defined in: [src/parser/classes/SubFeedSelector.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedSelector.ts#L10) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/SubFeedSelector.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SubFeedSelector.ts#L9) +Defined in: [src/parser/classes/SubFeedSelector.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedSelector.ts#L9) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'SubFeedSelector'` +Defined in: [src/parser/classes/SubFeedSelector.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubFeedSelector.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/SubFeedSelector.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/SubFeedSelector.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is SubFeedSelector & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeButton.md new file mode 100644 index 00000000..9cc4a58c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeButton.md @@ -0,0 +1,351 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SubscribeButton + +# Class: SubscribeButton + +Defined in: [src/parser/classes/SubscribeButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SubscribeButton**(`data`): `SubscribeButton` + +Defined in: [src/parser/classes/SubscribeButton.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L28) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SubscribeButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button\_text + +> **button\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SubscribeButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L10) + +*** + +### channel\_id + +> **channel\_id**: `string` + +Defined in: [src/parser/classes/SubscribeButton.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L14) + +*** + +### enabled + +> **enabled**: `boolean` + +Defined in: [src/parser/classes/SubscribeButton.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L12) + +*** + +### item\_type + +> **item\_type**: `string` + +Defined in: [src/parser/classes/SubscribeButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L13) + +*** + +### notification\_preference\_button + +> **notification\_preference\_button**: [`SubscriptionNotificationToggleButton`](SubscriptionNotificationToggleButton.md) \| `null` + +Defined in: [src/parser/classes/SubscribeButton.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L19) + +*** + +### on\_subscribe\_endpoints? + +> `optional` **on\_subscribe\_endpoints**: [`NavigationEndpoint`](NavigationEndpoint.md)[] + +Defined in: [src/parser/classes/SubscribeButton.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L21) + +*** + +### on\_unsubscribe\_endpoints? + +> `optional` **on\_unsubscribe\_endpoints**: [`NavigationEndpoint`](NavigationEndpoint.md)[] + +Defined in: [src/parser/classes/SubscribeButton.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L22) + +*** + +### service\_endpoints? + +> `optional` **service\_endpoints**: [`NavigationEndpoint`](NavigationEndpoint.md)[] + +Defined in: [src/parser/classes/SubscribeButton.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L20) + +*** + +### show\_preferences + +> **show\_preferences**: `boolean` + +Defined in: [src/parser/classes/SubscribeButton.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L15) + +*** + +### subscribe\_accessibility\_label? + +> `optional` **subscribe\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/SubscribeButton.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L25) + +*** + +### subscribed + +> **subscribed**: `boolean` + +Defined in: [src/parser/classes/SubscribeButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L11) + +*** + +### subscribed\_entity\_key? + +> `optional` **subscribed\_entity\_key**: `string` + +Defined in: [src/parser/classes/SubscribeButton.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L23) + +*** + +### subscribed\_text? + +> `optional` **subscribed\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SubscribeButton.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L16) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/SubscribeButton.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L24) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### unsubscribe\_accessibility\_label? + +> `optional` **unsubscribe\_accessibility\_label**: `string` + +Defined in: [src/parser/classes/SubscribeButton.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L26) + +*** + +### unsubscribe\_text? + +> `optional` **unsubscribe\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SubscribeButton.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L18) + +*** + +### unsubscribed\_text? + +> `optional` **unsubscribed\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/SubscribeButton.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L17) + +*** + +### type + +> `static` **type**: `string` = `'SubscribeButton'` + +Defined in: [src/parser/classes/SubscribeButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButton.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SubscribeButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SubscribeButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeButtonView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeButtonView.md new file mode 100644 index 00000000..09741a05 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeButtonView.md @@ -0,0 +1,327 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SubscribeButtonView + +# Class: SubscribeButtonView + +Defined in: [src/parser/classes/SubscribeButtonView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L13) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SubscribeButtonView**(`data`): `SubscribeButtonView` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L36) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SubscribeButtonView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### background\_style + +> **background\_style**: `string` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L24) + +*** + +### bell\_accessiblity\_data + +> **bell\_accessiblity\_data**: `object` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L29) + +#### all\_label + +> **all\_label**: `string` + +#### disabled\_label + +> **disabled\_label**: `string` + +#### occasional\_label + +> **occasional\_label**: `string` + +#### off\_label + +> **off\_label**: `string` + +*** + +### button\_style + +> **button\_style**: `object` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L19) + +#### subscribed\_state\_style + +> **subscribed\_state\_style**: `string` + +#### unsubscribed\_state\_style + +> **unsubscribed\_state\_style**: `string` + +*** + +### channel\_id + +> **channel\_id**: `string` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L27) + +*** + +### disable\_notification\_bell + +> **disable\_notification\_bell**: `boolean` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L18) + +*** + +### disable\_subscribe\_button + +> **disable\_subscribe\_button**: `boolean` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L25) + +*** + +### enable\_subscribe\_button\_post\_click\_animation + +> **enable\_subscribe\_button\_post\_click\_animation**: `boolean` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L28) + +*** + +### is\_signed\_out + +> **is\_signed\_out**: `boolean` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L23) + +*** + +### on\_show\_subscription\_options + +> **on\_show\_subscription\_options**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/SubscribeButtonView.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L26) + +*** + +### subscribe\_button\_content + +> **subscribe\_button\_content**: `ButtonContent` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### unsubscribe\_button\_content + +> **unsubscribe\_button\_content**: `ButtonContent` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L17) + +*** + +### type + +> `static` **type**: `string` = `'SubscribeButtonView'` + +Defined in: [src/parser/classes/SubscribeButtonView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscribeButtonView.ts#L14) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SubscribeButtonView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SubscribeButtonView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeEndpoint.md new file mode 100644 index 00000000..b56ee70b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscribeEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SubscribeEndpoint + +# Class: SubscribeEndpoint + +Defined in: [src/parser/classes/endpoints/SubscribeEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SubscribeEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`SubscribeRequest`](../../../../type-aliases/SubscribeRequest.md)\> + +## Constructors + +### Constructor + +> **new SubscribeEndpoint**(`data`): `SubscribeEndpoint` + +Defined in: [src/parser/classes/endpoints/SubscribeEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SubscribeEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`SubscribeEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SubscribeEndpoint'` + +Defined in: [src/parser/classes/endpoints/SubscribeEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SubscribeEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`SubscribeRequest`](../../../../type-aliases/SubscribeRequest.md) + +Defined in: [src/parser/classes/endpoints/SubscribeEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SubscribeEndpoint.ts#L20) + +#### Returns + +[`SubscribeRequest`](../../../../type-aliases/SubscribeRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/SubscribeEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/SubscribeEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SubscribeEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SubscribeEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscriptionNotificationToggleButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscriptionNotificationToggleButton.md new file mode 100644 index 00000000..8e401408 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/SubscriptionNotificationToggleButton.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / SubscriptionNotificationToggleButton + +# Class: SubscriptionNotificationToggleButton + +Defined in: [src/parser/classes/SubscriptionNotificationToggleButton.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscriptionNotificationToggleButton.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new SubscriptionNotificationToggleButton**(`data`): `SubscriptionNotificationToggleButton` + +Defined in: [src/parser/classes/SubscriptionNotificationToggleButton.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscriptionNotificationToggleButton.ts#L16) + +#### Parameters + +##### data + +`any` + +#### Returns + +`SubscriptionNotificationToggleButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### current\_state\_id + +> **current\_state\_id**: `string` + +Defined in: [src/parser/classes/SubscriptionNotificationToggleButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscriptionNotificationToggleButton.ts#L13) + +*** + +### states + +> **states**: `object` + +Defined in: [src/parser/classes/SubscriptionNotificationToggleButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscriptionNotificationToggleButton.ts#L7) + +#### id + +> **id**: `string` + +#### next\_id + +> **next\_id**: `string` + +#### state + +> **state**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/SubscriptionNotificationToggleButton.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscriptionNotificationToggleButton.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'SubscriptionNotificationToggleButton'` + +Defined in: [src/parser/classes/SubscriptionNotificationToggleButton.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/SubscriptionNotificationToggleButton.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is SubscriptionNotificationToggleButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is SubscriptionNotificationToggleButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Tab.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Tab.md new file mode 100644 index 00000000..608bbf7c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Tab.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Tab + +# Class: Tab + +Defined in: [src/parser/classes/Tab.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tab.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Tab**(`data`): `Tab` + +Defined in: [src/parser/classes/Tab.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tab.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Tab` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`SectionList`](SectionList.md) \| [`MusicQueue`](MusicQueue.md) \| [`RichGrid`](RichGrid.md) \| `null` + +Defined in: [src/parser/classes/Tab.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tab.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Tab.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tab.ts#L13) + +*** + +### selected + +> **selected**: `boolean` + +Defined in: [src/parser/classes/Tab.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tab.ts#L12) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/Tab.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tab.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Tab'` + +Defined in: [src/parser/classes/Tab.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tab.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Tab & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Tab & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Tabbed.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Tabbed.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/Tabbed.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Tabbed.md index 04996722..28508238 100644 --- a/docs/api/namespaces/YTNodes/classes/Tabbed.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Tabbed.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Tabbed +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Tabbed # Class: Tabbed +Defined in: [src/parser/classes/Tabbed.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tabbed.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Tabbed() +### Constructor -> **new Tabbed**(`data`): [`Tabbed`](Tabbed.md) +> **new Tabbed**(`data`): `Tabbed` + +Defined in: [src/parser/classes/Tabbed.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tabbed.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Tabbed`](Tabbed.md) +`Tabbed` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Tabbed.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Tabbed.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **contents**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/Tabbed.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Tabbed.ts#L7) +Defined in: [src/parser/classes/Tabbed.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tabbed.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Tabbed'` +Defined in: [src/parser/classes/Tabbed.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tabbed.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Tabbed.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Tabbed.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Tabbed & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/TabbedSearchResults.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TabbedSearchResults.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/TabbedSearchResults.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/TabbedSearchResults.md index d108143e..531a0f15 100644 --- a/docs/api/namespaces/YTNodes/classes/TabbedSearchResults.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TabbedSearchResults.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / TabbedSearchResults +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TabbedSearchResults # Class: TabbedSearchResults +Defined in: [src/parser/classes/TabbedSearchResults.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TabbedSearchResults.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new TabbedSearchResults() +### Constructor -> **new TabbedSearchResults**(`data`): [`TabbedSearchResults`](TabbedSearchResults.md) +> **new TabbedSearchResults**(`data`): `TabbedSearchResults` + +Defined in: [src/parser/classes/TabbedSearchResults.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TabbedSearchResults.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`TabbedSearchResults`](TabbedSearchResults.md) +`TabbedSearchResults` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/TabbedSearchResults.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TabbedSearchResults.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **tabs**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Tab`](Tab.md)\> -#### Defined in - -[src/parser/classes/TabbedSearchResults.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TabbedSearchResults.ts#L8) +Defined in: [src/parser/classes/TabbedSearchResults.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TabbedSearchResults.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'TabbedSearchResults'` +Defined in: [src/parser/classes/TabbedSearchResults.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TabbedSearchResults.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/TabbedSearchResults.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TabbedSearchResults.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is TabbedSearchResults & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TextCarouselItemView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TextCarouselItemView.md new file mode 100644 index 00000000..a1f876cd --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TextCarouselItemView.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TextCarouselItemView + +# Class: TextCarouselItemView + +Defined in: [src/parser/classes/TextCarouselItemView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextCarouselItemView.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TextCarouselItemView**(`data`): `TextCarouselItemView` + +Defined in: [src/parser/classes/TextCarouselItemView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextCarouselItemView.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TextCarouselItemView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button + +> **button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/TextCarouselItemView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextCarouselItemView.ts#L13) + +*** + +### icon\_name + +> **icon\_name**: `string` + +Defined in: [src/parser/classes/TextCarouselItemView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextCarouselItemView.ts#L10) + +*** + +### on\_tap\_endpoint + +> **on\_tap\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/TextCarouselItemView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextCarouselItemView.ts#L12) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TextCarouselItemView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextCarouselItemView.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TextCarouselItemView'` + +Defined in: [src/parser/classes/TextCarouselItemView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextCarouselItemView.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TextCarouselItemView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TextCarouselItemView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TextFieldView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TextFieldView.md new file mode 100644 index 00000000..fba4331c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TextFieldView.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TextFieldView + +# Class: TextFieldView + +Defined in: [src/parser/classes/TextFieldView.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextFieldView.ts#L24) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TextFieldView**(`data`): `TextFieldView` + +Defined in: [src/parser/classes/TextFieldView.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextFieldView.ts#L32) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TextFieldView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content\_properties? + +> `optional` **content\_properties**: `ContentProperties` + +Defined in: [src/parser/classes/TextFieldView.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextFieldView.ts#L28) + +*** + +### display\_properties? + +> `optional` **display\_properties**: `DisplayProperties` + +Defined in: [src/parser/classes/TextFieldView.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextFieldView.ts#L27) + +*** + +### form\_field\_metadata? + +> `optional` **form\_field\_metadata**: `FormFieldMetadata` + +Defined in: [src/parser/classes/TextFieldView.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextFieldView.ts#L30) + +*** + +### initial\_state? + +> `optional` **initial\_state**: `InitialState` + +Defined in: [src/parser/classes/TextFieldView.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextFieldView.ts#L29) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TextFieldView'` + +Defined in: [src/parser/classes/TextFieldView.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextFieldView.ts#L25) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TextFieldView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TextFieldView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/TextHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TextHeader.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/TextHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/TextHeader.md index 23fb74db..1fa97afe 100644 --- a/docs/api/namespaces/YTNodes/classes/TextHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TextHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / TextHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TextHeader # Class: TextHeader +Defined in: [src/parser/classes/TextHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new TextHeader() +### Constructor -> **new TextHeader**(`data`): [`TextHeader`](TextHeader.md) +> **new TextHeader**(`data`): `TextHeader` + +Defined in: [src/parser/classes/TextHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextHeader.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`TextHeader`](TextHeader.md) +`TextHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/TextHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TextHeader.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **style**: `string` -#### Defined in - -[src/parser/classes/TextHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TextHeader.ts#L9) +Defined in: [src/parser/classes/TextHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextHeader.ts#L9) *** @@ -44,9 +44,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/TextHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TextHeader.ts#L8) +Defined in: [src/parser/classes/TextHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextHeader.ts#L8) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'TextHeader'` +Defined in: [src/parser/classes/TextHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TextHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/TextHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TextHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is TextHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/namespaces/YTNodes/classes/ThirdPartyShareTargetSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThirdPartyShareTargetSection.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ThirdPartyShareTargetSection.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ThirdPartyShareTargetSection.md index 690ebdb0..80bbbad4 100644 --- a/docs/api/namespaces/YTNodes/classes/ThirdPartyShareTargetSection.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThirdPartyShareTargetSection.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ThirdPartyShareTargetSection +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThirdPartyShareTargetSection # Class: ThirdPartyShareTargetSection +Defined in: [src/parser/classes/ThirdPartyShareTargetSection.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThirdPartyShareTargetSection.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ThirdPartyShareTargetSection() +### Constructor -> **new ThirdPartyShareTargetSection**(`data`): [`ThirdPartyShareTargetSection`](ThirdPartyShareTargetSection.md) +> **new ThirdPartyShareTargetSection**(`data`): `ThirdPartyShareTargetSection` + +Defined in: [src/parser/classes/ThirdPartyShareTargetSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThirdPartyShareTargetSection.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ThirdPartyShareTargetSection`](ThirdPartyShareTargetSection.md) +`ThirdPartyShareTargetSection` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ThirdPartyShareTargetSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThirdPartyShareTargetSection.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **share\_targets**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ShareTarget`](ShareTarget.md)\> -#### Defined in - -[src/parser/classes/ThirdPartyShareTargetSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThirdPartyShareTargetSection.ts#L8) +Defined in: [src/parser/classes/ThirdPartyShareTargetSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThirdPartyShareTargetSection.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ThirdPartyShareTargetSection'` +Defined in: [src/parser/classes/ThirdPartyShareTargetSection.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThirdPartyShareTargetSection.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ThirdPartyShareTargetSection.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThirdPartyShareTargetSection.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ThirdPartyShareTargetSection & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailBadgeView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailBadgeView.md new file mode 100644 index 00000000..9bfd4cbe --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailBadgeView.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailBadgeView + +# Class: ThumbnailBadgeView + +Defined in: [src/parser/classes/ThumbnailBadgeView.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBadgeView.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailBadgeView**(`data`): `ThumbnailBadgeView` + +Defined in: [src/parser/classes/ThumbnailBadgeView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBadgeView.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailBadgeView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### background\_color? + +> `optional` **background\_color**: `object` + +Defined in: [src/parser/classes/ThumbnailBadgeView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBadgeView.ts#L10) + +#### dark\_theme + +> **dark\_theme**: `number` + +#### light\_theme + +> **light\_theme**: `number` + +*** + +### badge\_style + +> **badge\_style**: `string` + +Defined in: [src/parser/classes/ThumbnailBadgeView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBadgeView.ts#L9) + +*** + +### icon\_name? + +> `optional` **icon\_name**: `string` + +Defined in: [src/parser/classes/ThumbnailBadgeView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBadgeView.ts#L7) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/ThumbnailBadgeView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBadgeView.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailBadgeView'` + +Defined in: [src/parser/classes/ThumbnailBadgeView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBadgeView.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailBadgeView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailBadgeView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailBottomOverlayView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailBottomOverlayView.md new file mode 100644 index 00000000..753c3470 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailBottomOverlayView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailBottomOverlayView + +# Class: ThumbnailBottomOverlayView + +Defined in: [src/parser/classes/ThumbnailBottomOverlayView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBottomOverlayView.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailBottomOverlayView**(`data`): `ThumbnailBottomOverlayView` + +Defined in: [src/parser/classes/ThumbnailBottomOverlayView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBottomOverlayView.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailBottomOverlayView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ThumbnailBadgeView`](ThumbnailBadgeView.md)\> + +Defined in: [src/parser/classes/ThumbnailBottomOverlayView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBottomOverlayView.ts#L11) + +*** + +### progress\_bar + +> **progress\_bar**: [`ThumbnailOverlayProgressBarView`](ThumbnailOverlayProgressBarView.md) \| `null` + +Defined in: [src/parser/classes/ThumbnailBottomOverlayView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBottomOverlayView.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailBottomOverlayView'` + +Defined in: [src/parser/classes/ThumbnailBottomOverlayView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailBottomOverlayView.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailBottomOverlayView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailBottomOverlayView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ThumbnailHoverOverlayToggleActionsView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailHoverOverlayToggleActionsView.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ThumbnailHoverOverlayToggleActionsView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailHoverOverlayToggleActionsView.md index 27e6dd38..eae7f263 100644 --- a/docs/api/namespaces/YTNodes/classes/ThumbnailHoverOverlayToggleActionsView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailHoverOverlayToggleActionsView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ThumbnailHoverOverlayToggleActionsView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailHoverOverlayToggleActionsView # Class: ThumbnailHoverOverlayToggleActionsView +Defined in: [src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ThumbnailHoverOverlayToggleActionsView() +### Constructor -> **new ThumbnailHoverOverlayToggleActionsView**(`data`): [`ThumbnailHoverOverlayToggleActionsView`](ThumbnailHoverOverlayToggleActionsView.md) +> **new ThumbnailHoverOverlayToggleActionsView**(`data`): `ThumbnailHoverOverlayToggleActionsView` + +Defined in: [src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ThumbnailHoverOverlayToggleActionsView`](ThumbnailHoverOverlayToggleActionsView.md) +`ThumbnailHoverOverlayToggleActionsView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **buttons**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ToggleButtonView`](ToggleButtonView.md)\> -#### Defined in - -[src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts#L9) +Defined in: [src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts#L9) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ThumbnailHoverOverlayToggleActionsView'` +Defined in: [src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailHoverOverlayToggleActionsView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailHoverOverlayView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailHoverOverlayView.md new file mode 100644 index 00000000..b76eb4f7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailHoverOverlayView.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailHoverOverlayView + +# Class: ThumbnailHoverOverlayView + +Defined in: [src/parser/classes/ThumbnailHoverOverlayView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailHoverOverlayView**(`data`): `ThumbnailHoverOverlayView` + +Defined in: [src/parser/classes/ThumbnailHoverOverlayView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailHoverOverlayView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_name + +> **icon\_name**: `string` + +Defined in: [src/parser/classes/ThumbnailHoverOverlayView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayView.ts#L8) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/ThumbnailHoverOverlayView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayView.ts#L10) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ThumbnailHoverOverlayView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailHoverOverlayView'` + +Defined in: [src/parser/classes/ThumbnailHoverOverlayView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailHoverOverlayView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailHoverOverlayView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailHoverOverlayView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailLandscapePortrait.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailLandscapePortrait.md new file mode 100644 index 00000000..d461d7c9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailLandscapePortrait.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailLandscapePortrait + +# Class: ThumbnailLandscapePortrait + +Defined in: [src/parser/classes/ThumbnailLandscapePortrait.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailLandscapePortrait.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailLandscapePortrait**(`data`): `ThumbnailLandscapePortrait` + +Defined in: [src/parser/classes/ThumbnailLandscapePortrait.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailLandscapePortrait.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailLandscapePortrait` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### landscape + +> **landscape**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ThumbnailLandscapePortrait.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailLandscapePortrait.ts#L8) + +*** + +### portrait + +> **portrait**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/ThumbnailLandscapePortrait.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailLandscapePortrait.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailLandscapePortrait'` + +Defined in: [src/parser/classes/ThumbnailLandscapePortrait.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailLandscapePortrait.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailLandscapePortrait & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailLandscapePortrait & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayBadgeView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayBadgeView.md new file mode 100644 index 00000000..0d660cf8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayBadgeView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayBadgeView + +# Class: ThumbnailOverlayBadgeView + +Defined in: [src/parser/classes/ThumbnailOverlayBadgeView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBadgeView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayBadgeView**(`data`): `ThumbnailOverlayBadgeView` + +Defined in: [src/parser/classes/ThumbnailOverlayBadgeView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBadgeView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayBadgeView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ThumbnailBadgeView`](ThumbnailBadgeView.md)\> + +Defined in: [src/parser/classes/ThumbnailOverlayBadgeView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBadgeView.ts#L9) + +*** + +### position + +> **position**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayBadgeView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBadgeView.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayBadgeView'` + +Defined in: [src/parser/classes/ThumbnailOverlayBadgeView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBadgeView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayBadgeView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayBadgeView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayBottomPanel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayBottomPanel.md new file mode 100644 index 00000000..e9b35a7f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayBottomPanel.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayBottomPanel + +# Class: ThumbnailOverlayBottomPanel + +Defined in: [src/parser/classes/ThumbnailOverlayBottomPanel.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBottomPanel.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayBottomPanel**(`data`): `ThumbnailOverlayBottomPanel` + +Defined in: [src/parser/classes/ThumbnailOverlayBottomPanel.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBottomPanel.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayBottomPanel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayBottomPanel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBottomPanel.ts#L9) + +*** + +### text? + +> `optional` **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ThumbnailOverlayBottomPanel.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBottomPanel.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayBottomPanel'` + +Defined in: [src/parser/classes/ThumbnailOverlayBottomPanel.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayBottomPanel.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayBottomPanel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayBottomPanel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayEndorsement.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayEndorsement.md new file mode 100644 index 00000000..12aa121d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayEndorsement.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayEndorsement + +# Class: ThumbnailOverlayEndorsement + +Defined in: [src/parser/classes/ThumbnailOverlayEndorsement.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayEndorsement.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayEndorsement**(`data`): `ThumbnailOverlayEndorsement` + +Defined in: [src/parser/classes/ThumbnailOverlayEndorsement.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayEndorsement.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayEndorsement` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayEndorsement.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayEndorsement.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayEndorsement'` + +Defined in: [src/parser/classes/ThumbnailOverlayEndorsement.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayEndorsement.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayEndorsement & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayEndorsement & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayHoverText.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayHoverText.md new file mode 100644 index 00000000..a915a343 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayHoverText.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayHoverText + +# Class: ThumbnailOverlayHoverText + +Defined in: [src/parser/classes/ThumbnailOverlayHoverText.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayHoverText.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayHoverText**(`data`): `ThumbnailOverlayHoverText` + +Defined in: [src/parser/classes/ThumbnailOverlayHoverText.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayHoverText.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayHoverText` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayHoverText.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayHoverText.ts#L9) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ThumbnailOverlayHoverText.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayHoverText.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayHoverText'` + +Defined in: [src/parser/classes/ThumbnailOverlayHoverText.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayHoverText.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayHoverText & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayHoverText & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayInlineUnplayable.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayInlineUnplayable.md new file mode 100644 index 00000000..4bc2e857 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayInlineUnplayable.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayInlineUnplayable + +# Class: ThumbnailOverlayInlineUnplayable + +Defined in: [src/parser/classes/ThumbnailOverlayInlineUnplayable.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayInlineUnplayable.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayInlineUnplayable**(`data`): `ThumbnailOverlayInlineUnplayable` + +Defined in: [src/parser/classes/ThumbnailOverlayInlineUnplayable.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayInlineUnplayable.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayInlineUnplayable` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayInlineUnplayable.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayInlineUnplayable.ts#L9) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayInlineUnplayable.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayInlineUnplayable.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayInlineUnplayable'` + +Defined in: [src/parser/classes/ThumbnailOverlayInlineUnplayable.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayInlineUnplayable.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayInlineUnplayable & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayInlineUnplayable & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayLoadingPreview.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayLoadingPreview.md new file mode 100644 index 00000000..dc96cbc7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayLoadingPreview.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayLoadingPreview + +# Class: ThumbnailOverlayLoadingPreview + +Defined in: [src/parser/classes/ThumbnailOverlayLoadingPreview.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayLoadingPreview.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayLoadingPreview**(`data`): `ThumbnailOverlayLoadingPreview` + +Defined in: [src/parser/classes/ThumbnailOverlayLoadingPreview.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayLoadingPreview.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayLoadingPreview` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ThumbnailOverlayLoadingPreview.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayLoadingPreview.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayLoadingPreview'` + +Defined in: [src/parser/classes/ThumbnailOverlayLoadingPreview.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayLoadingPreview.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayLoadingPreview & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayLoadingPreview & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayNowPlaying.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayNowPlaying.md new file mode 100644 index 00000000..0e1c6a01 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayNowPlaying.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayNowPlaying + +# Class: ThumbnailOverlayNowPlaying + +Defined in: [src/parser/classes/ThumbnailOverlayNowPlaying.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayNowPlaying.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayNowPlaying**(`data`): `ThumbnailOverlayNowPlaying` + +Defined in: [src/parser/classes/ThumbnailOverlayNowPlaying.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayNowPlaying.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayNowPlaying` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayNowPlaying.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayNowPlaying.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayNowPlaying'` + +Defined in: [src/parser/classes/ThumbnailOverlayNowPlaying.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayNowPlaying.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayNowPlaying & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayNowPlaying & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ThumbnailOverlayPinking.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayPinking.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ThumbnailOverlayPinking.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayPinking.md index 1234063b..2bcc15bb 100644 --- a/docs/api/namespaces/YTNodes/classes/ThumbnailOverlayPinking.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayPinking.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayPinking +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayPinking # Class: ThumbnailOverlayPinking +Defined in: [src/parser/classes/ThumbnailOverlayPinking.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayPinking.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ThumbnailOverlayPinking() +### Constructor -> **new ThumbnailOverlayPinking**(`data`): [`ThumbnailOverlayPinking`](ThumbnailOverlayPinking.md) +> **new ThumbnailOverlayPinking**(`data`): `ThumbnailOverlayPinking` + +Defined in: [src/parser/classes/ThumbnailOverlayPinking.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayPinking.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ThumbnailOverlayPinking`](ThumbnailOverlayPinking.md) +`ThumbnailOverlayPinking` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ThumbnailOverlayPinking.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailOverlayPinking.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **hack**: `boolean` -#### Defined in - -[src/parser/classes/ThumbnailOverlayPinking.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailOverlayPinking.ts#L7) +Defined in: [src/parser/classes/ThumbnailOverlayPinking.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayPinking.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ThumbnailOverlayPinking'` +Defined in: [src/parser/classes/ThumbnailOverlayPinking.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayPinking.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ThumbnailOverlayPinking.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailOverlayPinking.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayPinking & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayPlaybackStatus.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayPlaybackStatus.md new file mode 100644 index 00000000..2fb38123 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayPlaybackStatus.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayPlaybackStatus + +# Class: ThumbnailOverlayPlaybackStatus + +Defined in: [src/parser/classes/ThumbnailOverlayPlaybackStatus.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayPlaybackStatus.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayPlaybackStatus**(`data`): `ThumbnailOverlayPlaybackStatus` + +Defined in: [src/parser/classes/ThumbnailOverlayPlaybackStatus.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayPlaybackStatus.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayPlaybackStatus` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### texts + +> **texts**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/ThumbnailOverlayPlaybackStatus.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayPlaybackStatus.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayPlaybackStatus'` + +Defined in: [src/parser/classes/ThumbnailOverlayPlaybackStatus.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayPlaybackStatus.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayPlaybackStatus & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayPlaybackStatus & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayProgressBarView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayProgressBarView.md new file mode 100644 index 00000000..e9215398 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayProgressBarView.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayProgressBarView + +# Class: ThumbnailOverlayProgressBarView + +Defined in: [src/parser/classes/ThumbnailOverlayProgressBarView.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayProgressBarView.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayProgressBarView**(`data`): `ThumbnailOverlayProgressBarView` + +Defined in: [src/parser/classes/ThumbnailOverlayProgressBarView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayProgressBarView.ts#L9) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayProgressBarView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### start\_percent + +> **start\_percent**: `number` + +Defined in: [src/parser/classes/ThumbnailOverlayProgressBarView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayProgressBarView.ts#L7) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayProgressBarView'` + +Defined in: [src/parser/classes/ThumbnailOverlayProgressBarView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayProgressBarView.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayProgressBarView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayProgressBarView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ThumbnailOverlayResumePlayback.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayResumePlayback.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/ThumbnailOverlayResumePlayback.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayResumePlayback.md index 4c63b141..427ade15 100644 --- a/docs/api/namespaces/YTNodes/classes/ThumbnailOverlayResumePlayback.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayResumePlayback.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayResumePlayback +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayResumePlayback # Class: ThumbnailOverlayResumePlayback +Defined in: [src/parser/classes/ThumbnailOverlayResumePlayback.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayResumePlayback.ts#L4) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ThumbnailOverlayResumePlayback() +### Constructor -> **new ThumbnailOverlayResumePlayback**(`data`): [`ThumbnailOverlayResumePlayback`](ThumbnailOverlayResumePlayback.md) +> **new ThumbnailOverlayResumePlayback**(`data`): `ThumbnailOverlayResumePlayback` + +Defined in: [src/parser/classes/ThumbnailOverlayResumePlayback.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayResumePlayback.ts#L9) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ThumbnailOverlayResumePlayback`](ThumbnailOverlayResumePlayback.md) +`ThumbnailOverlayResumePlayback` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ThumbnailOverlayResumePlayback.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailOverlayResumePlayback.ts#L9) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **percent\_duration\_watched**: `number` -#### Defined in - -[src/parser/classes/ThumbnailOverlayResumePlayback.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailOverlayResumePlayback.ts#L7) +Defined in: [src/parser/classes/ThumbnailOverlayResumePlayback.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayResumePlayback.ts#L7) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ThumbnailOverlayResumePlayback'` +Defined in: [src/parser/classes/ThumbnailOverlayResumePlayback.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayResumePlayback.ts#L5) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ThumbnailOverlayResumePlayback.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailOverlayResumePlayback.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayResumePlayback & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlaySidePanel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlaySidePanel.md new file mode 100644 index 00000000..2737c7b2 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlaySidePanel.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlaySidePanel + +# Class: ThumbnailOverlaySidePanel + +Defined in: [src/parser/classes/ThumbnailOverlaySidePanel.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlaySidePanel.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlaySidePanel**(`data`): `ThumbnailOverlaySidePanel` + +Defined in: [src/parser/classes/ThumbnailOverlaySidePanel.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlaySidePanel.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlaySidePanel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlaySidePanel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlaySidePanel.ts#L9) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ThumbnailOverlaySidePanel.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlaySidePanel.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlaySidePanel'` + +Defined in: [src/parser/classes/ThumbnailOverlaySidePanel.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlaySidePanel.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlaySidePanel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlaySidePanel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayTimeStatus.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayTimeStatus.md new file mode 100644 index 00000000..f2ae6eac --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayTimeStatus.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayTimeStatus + +# Class: ThumbnailOverlayTimeStatus + +Defined in: [src/parser/classes/ThumbnailOverlayTimeStatus.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayTimeStatus.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayTimeStatus**(`data`): `ThumbnailOverlayTimeStatus` + +Defined in: [src/parser/classes/ThumbnailOverlayTimeStatus.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayTimeStatus.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayTimeStatus` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayTimeStatus.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayTimeStatus.ts#L9) + +*** + +### text + +> **text**: `string` + +Defined in: [src/parser/classes/ThumbnailOverlayTimeStatus.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayTimeStatus.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayTimeStatus'` + +Defined in: [src/parser/classes/ThumbnailOverlayTimeStatus.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayTimeStatus.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayTimeStatus & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayTimeStatus & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayToggleButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayToggleButton.md new file mode 100644 index 00000000..a1f5f48c --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailOverlayToggleButton.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailOverlayToggleButton + +# Class: ThumbnailOverlayToggleButton + +Defined in: [src/parser/classes/ThumbnailOverlayToggleButton.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayToggleButton.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ThumbnailOverlayToggleButton**(`data`): `ThumbnailOverlayToggleButton` + +Defined in: [src/parser/classes/ThumbnailOverlayToggleButton.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayToggleButton.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ThumbnailOverlayToggleButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type + +> **icon\_type**: `object` + +Defined in: [src/parser/classes/ThumbnailOverlayToggleButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayToggleButton.ts#L10) + +#### toggled + +> **toggled**: `string` + +#### untoggled + +> **untoggled**: `string` + +*** + +### is\_toggled? + +> `optional` **is\_toggled**: `boolean` + +Defined in: [src/parser/classes/ThumbnailOverlayToggleButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayToggleButton.ts#L8) + +*** + +### toggled\_endpoint? + +> `optional` **toggled\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ThumbnailOverlayToggleButton.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayToggleButton.ts#L20) + +*** + +### tooltip + +> **tooltip**: `object` + +Defined in: [src/parser/classes/ThumbnailOverlayToggleButton.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayToggleButton.ts#L15) + +#### toggled + +> **toggled**: `string` + +#### untoggled + +> **untoggled**: `string` + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### untoggled\_endpoint? + +> `optional` **untoggled\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ThumbnailOverlayToggleButton.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayToggleButton.ts#L21) + +*** + +### type + +> `static` **type**: `string` = `'ThumbnailOverlayToggleButton'` + +Defined in: [src/parser/classes/ThumbnailOverlayToggleButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailOverlayToggleButton.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailOverlayToggleButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ThumbnailOverlayToggleButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/ThumbnailView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailView.md similarity index 53% rename from docs/api/namespaces/YTNodes/classes/ThumbnailView.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailView.md index 816ecbb3..e62c170b 100644 --- a/docs/api/namespaces/YTNodes/classes/ThumbnailView.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ThumbnailView.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / ThumbnailView +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ThumbnailView # Class: ThumbnailView +Defined in: [src/parser/classes/ThumbnailView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailView.ts#L16) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new ThumbnailView() +### Constructor -> **new ThumbnailView**(`data`): [`ThumbnailView`](ThumbnailView.md) +> **new ThumbnailView**(`data`): `ThumbnailView` + +Defined in: [src/parser/classes/ThumbnailView.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailView.ts#L27) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`ThumbnailView`](ThumbnailView.md) +`ThumbnailView` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/ThumbnailView.ts:27](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailView.ts#L27) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > `optional` **background\_color**: `ThumbnailBackgroundColor` -#### Defined in - -[src/parser/classes/ThumbnailView.ts:25](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailView.ts#L25) +Defined in: [src/parser/classes/ThumbnailView.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailView.ts#L25) *** @@ -44,9 +44,7 @@ > **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] -#### Defined in - -[src/parser/classes/ThumbnailView.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailView.ts#L19) +Defined in: [src/parser/classes/ThumbnailView.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailView.ts#L19) *** @@ -54,9 +52,7 @@ > **overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`AnimatedThumbnailOverlayView`](AnimatedThumbnailOverlayView.md) \| [`ThumbnailHoverOverlayView`](ThumbnailHoverOverlayView.md) \| [`ThumbnailOverlayBadgeView`](ThumbnailOverlayBadgeView.md) \| [`ThumbnailHoverOverlayToggleActionsView`](ThumbnailHoverOverlayToggleActionsView.md) \| [`ThumbnailBottomOverlayView`](ThumbnailBottomOverlayView.md)\> -#### Defined in - -[src/parser/classes/ThumbnailView.ts:20](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailView.ts#L20) +Defined in: [src/parser/classes/ThumbnailView.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailView.ts#L20) *** @@ -64,45 +60,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'ThumbnailView'` +Defined in: [src/parser/classes/ThumbnailView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ThumbnailView.ts#L17) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/ThumbnailView.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/ThumbnailView.ts#L17) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -120,27 +120,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is ThumbnailView & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -154,27 +158,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -188,27 +196,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -225,7 +237,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TimedMarkerDecoration.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TimedMarkerDecoration.md new file mode 100644 index 00000000..8b4ba290 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TimedMarkerDecoration.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TimedMarkerDecoration + +# Class: TimedMarkerDecoration + +Defined in: [src/parser/classes/TimedMarkerDecoration.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TimedMarkerDecoration.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TimedMarkerDecoration**(`data`): `TimedMarkerDecoration` + +Defined in: [src/parser/classes/TimedMarkerDecoration.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TimedMarkerDecoration.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TimedMarkerDecoration` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### decoration\_time\_millis + +> **decoration\_time\_millis**: `number` + +Defined in: [src/parser/classes/TimedMarkerDecoration.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TimedMarkerDecoration.ts#L10) + +*** + +### icon + +> **icon**: `string` + +Defined in: [src/parser/classes/TimedMarkerDecoration.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TimedMarkerDecoration.ts#L12) + +*** + +### label + +> **label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TimedMarkerDecoration.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TimedMarkerDecoration.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### visible\_time\_range\_end\_millis + +> **visible\_time\_range\_end\_millis**: `number` + +Defined in: [src/parser/classes/TimedMarkerDecoration.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TimedMarkerDecoration.ts#L9) + +*** + +### visible\_time\_range\_start\_millis + +> **visible\_time\_range\_start\_millis**: `number` + +Defined in: [src/parser/classes/TimedMarkerDecoration.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TimedMarkerDecoration.ts#L8) + +*** + +### type + +> `static` **type**: `string` = `'TimedMarkerDecoration'` + +Defined in: [src/parser/classes/TimedMarkerDecoration.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TimedMarkerDecoration.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TimedMarkerDecoration & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TimedMarkerDecoration & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/TitleAndButtonListHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TitleAndButtonListHeader.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/TitleAndButtonListHeader.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/TitleAndButtonListHeader.md index 63747b82..eca1bca9 100644 --- a/docs/api/namespaces/YTNodes/classes/TitleAndButtonListHeader.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TitleAndButtonListHeader.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / TitleAndButtonListHeader +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TitleAndButtonListHeader # Class: TitleAndButtonListHeader +Defined in: [src/parser/classes/TitleAndButtonListHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TitleAndButtonListHeader.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new TitleAndButtonListHeader() +### Constructor -> **new TitleAndButtonListHeader**(`data`): [`TitleAndButtonListHeader`](TitleAndButtonListHeader.md) +> **new TitleAndButtonListHeader**(`data`): `TitleAndButtonListHeader` + +Defined in: [src/parser/classes/TitleAndButtonListHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TitleAndButtonListHeader.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`TitleAndButtonListHeader`](TitleAndButtonListHeader.md) +`TitleAndButtonListHeader` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/TitleAndButtonListHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TitleAndButtonListHeader.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/TitleAndButtonListHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TitleAndButtonListHeader.ts#L8) +Defined in: [src/parser/classes/TitleAndButtonListHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TitleAndButtonListHeader.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'TitleAndButtonListHeader'` +Defined in: [src/parser/classes/TitleAndButtonListHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TitleAndButtonListHeader.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/TitleAndButtonListHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TitleAndButtonListHeader.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is TitleAndButtonListHeader & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleButton.md new file mode 100644 index 00000000..0f69b64e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleButton.md @@ -0,0 +1,319 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ToggleButton + +# Class: ToggleButton + +Defined in: [src/parser/classes/ToggleButton.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ToggleButton**(`data`): `ToggleButton` + +Defined in: [src/parser/classes/ToggleButton.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ToggleButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button\_id? + +> `optional` **button\_id**: `string` + +Defined in: [src/parser/classes/ToggleButton.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L20) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ToggleButton.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L18) + +*** + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/ToggleButton.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L15) + +*** + +### is\_disabled + +> **is\_disabled**: `boolean` + +Defined in: [src/parser/classes/ToggleButton.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L14) + +*** + +### is\_toggled + +> **is\_toggled**: `boolean` + +Defined in: [src/parser/classes/ToggleButton.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L13) + +*** + +### like\_count? + +> `optional` **like\_count**: `number` + +Defined in: [src/parser/classes/ToggleButton.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L16) + +*** + +### short\_like\_count? + +> `optional` **short\_like\_count**: `string` + +Defined in: [src/parser/classes/ToggleButton.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L17) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/ToggleButton.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L21) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ToggleButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L9) + +*** + +### toggled\_endpoint + +> **toggled\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ToggleButton.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L19) + +*** + +### toggled\_text + +> **toggled\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ToggleButton.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L10) + +*** + +### toggled\_tooltip + +> **toggled\_tooltip**: `string` + +Defined in: [src/parser/classes/ToggleButton.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L12) + +*** + +### tooltip + +> **tooltip**: `string` + +Defined in: [src/parser/classes/ToggleButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ToggleButton'` + +Defined in: [src/parser/classes/ToggleButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButton.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ToggleButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ToggleButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleButtonView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleButtonView.md new file mode 100644 index 00000000..3e57e1c4 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleButtonView.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ToggleButtonView + +# Class: ToggleButtonView + +Defined in: [src/parser/classes/ToggleButtonView.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButtonView.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ToggleButtonView**(`data`): `ToggleButtonView` + +Defined in: [src/parser/classes/ToggleButtonView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButtonView.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ToggleButtonView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### default\_button + +> **default\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/ToggleButtonView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButtonView.ts#L8) + +*** + +### identifier? + +> `optional` **identifier**: `string` + +Defined in: [src/parser/classes/ToggleButtonView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButtonView.ts#L11) + +*** + +### is\_toggled? + +> `optional` **is\_toggled**: `boolean` + +Defined in: [src/parser/classes/ToggleButtonView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButtonView.ts#L12) + +*** + +### is\_toggling\_disabled + +> **is\_toggling\_disabled**: `boolean` + +Defined in: [src/parser/classes/ToggleButtonView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButtonView.ts#L10) + +*** + +### toggled\_button + +> **toggled\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/ToggleButtonView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButtonView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ToggleButtonView'` + +Defined in: [src/parser/classes/ToggleButtonView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleButtonView.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ToggleButtonView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ToggleButtonView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleFormField.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleFormField.md new file mode 100644 index 00000000..5bfb5ef0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleFormField.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ToggleFormField + +# Class: ToggleFormField + +Defined in: [src/parser/classes/ToggleFormField.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleFormField.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ToggleFormField**(`data`): `ToggleFormField` + +Defined in: [src/parser/classes/ToggleFormField.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleFormField.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ToggleFormField` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### label + +> **label**: `Text` + +Defined in: [src/parser/classes/ToggleFormField.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleFormField.ts#L8) + +*** + +### toggle\_off\_action? + +> `optional` **toggle\_off\_action**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ToggleFormField.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleFormField.ts#L11) + +*** + +### toggle\_on\_action? + +> `optional` **toggle\_on\_action**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ToggleFormField.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleFormField.ts#L10) + +*** + +### toggled + +> **toggled**: `boolean` + +Defined in: [src/parser/classes/ToggleFormField.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleFormField.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ToggleFormField'` + +Defined in: [src/parser/classes/ToggleFormField.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleFormField.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ToggleFormField & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ToggleFormField & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleMenuServiceItem.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleMenuServiceItem.md new file mode 100644 index 00000000..0070f5e7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ToggleMenuServiceItem.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ToggleMenuServiceItem + +# Class: ToggleMenuServiceItem + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ToggleMenuServiceItem**(`data`): `ToggleMenuServiceItem` + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ToggleMenuServiceItem` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### default\_endpoint + +> **default\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L13) + +*** + +### icon\_type + +> **icon\_type**: `string` + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L11) + +*** + +### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L9) + +*** + +### toggled\_endpoint + +> **toggled\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L14) + +*** + +### toggled\_icon\_type + +> **toggled\_icon\_type**: `string` + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L12) + +*** + +### toggled\_text + +> **toggled\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'ToggleMenuServiceItem'` + +Defined in: [src/parser/classes/ToggleMenuServiceItem.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ToggleMenuServiceItem.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ToggleMenuServiceItem & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ToggleMenuServiceItem & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Tooltip.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Tooltip.md new file mode 100644 index 00000000..4b2ed480 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Tooltip.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Tooltip + +# Class: Tooltip + +Defined in: [src/parser/classes/Tooltip.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new Tooltip**(`data`): `Tooltip` + +Defined in: [src/parser/classes/Tooltip.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L22) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Tooltip` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### details + +> **details**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Tooltip.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L17) + +*** + +### dismiss\_stratedy + +> **dismiss\_stratedy**: `string` + +Defined in: [src/parser/classes/Tooltip.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L19) + +*** + +### dwell\_time\_ms + +> **dwell\_time\_ms**: `number` + +Defined in: [src/parser/classes/Tooltip.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L20) + +*** + +### promo\_config + +> **promo\_config**: `object` + +Defined in: [src/parser/classes/Tooltip.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L9) + +#### accept + +> **accept**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### dismiss + +> **dismiss**: [`NavigationEndpoint`](NavigationEndpoint.md) + +#### impression\_endpoints + +> **impression\_endpoints**: [`NavigationEndpoint`](NavigationEndpoint.md)[] + +#### promo\_id + +> **promo\_id**: `string` + +*** + +### suggested\_position + +> **suggested\_position**: `string` + +Defined in: [src/parser/classes/Tooltip.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L18) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/Tooltip.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L16) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'Tooltip'` + +Defined in: [src/parser/classes/Tooltip.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Tooltip.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Tooltip & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Tooltip & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TopbarMenuButton.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TopbarMenuButton.md new file mode 100644 index 00000000..24f0f805 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TopbarMenuButton.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TopbarMenuButton + +# Class: TopbarMenuButton + +Defined in: [src/parser/classes/mweb/TopbarMenuButton.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/TopbarMenuButton.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TopbarMenuButton**(`data`): `TopbarMenuButton` + +Defined in: [src/parser/classes/mweb/TopbarMenuButton.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/TopbarMenuButton.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TopbarMenuButton` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### icon\_type? + +> `optional` **icon\_type**: `string` + +Defined in: [src/parser/classes/mweb/TopbarMenuButton.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/TopbarMenuButton.ts#L7) + +*** + +### menu\_renderer + +> **menu\_renderer**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/mweb/TopbarMenuButton.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/TopbarMenuButton.ts#L8) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/mweb/TopbarMenuButton.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/TopbarMenuButton.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TopbarMenuButton'` + +Defined in: [src/parser/classes/mweb/TopbarMenuButton.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/mweb/TopbarMenuButton.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TopbarMenuButton & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TopbarMenuButton & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TopicChannelDetails.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TopicChannelDetails.md new file mode 100644 index 00000000..2ae853ed --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TopicChannelDetails.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TopicChannelDetails + +# Class: TopicChannelDetails + +Defined in: [src/parser/classes/TopicChannelDetails.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TopicChannelDetails.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TopicChannelDetails**(`data`): `TopicChannelDetails` + +Defined in: [src/parser/classes/TopicChannelDetails.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TopicChannelDetails.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TopicChannelDetails` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### avatar + +> **avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/TopicChannelDetails.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TopicChannelDetails.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/TopicChannelDetails.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TopicChannelDetails.ts#L15) + +*** + +### subscribe\_button + +> **subscribe\_button**: [`SubscribeButton`](SubscribeButton.md) \| `null` + +Defined in: [src/parser/classes/TopicChannelDetails.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TopicChannelDetails.ts#L14) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TopicChannelDetails.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TopicChannelDetails.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TopicChannelDetails.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TopicChannelDetails.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TopicChannelDetails'` + +Defined in: [src/parser/classes/TopicChannelDetails.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TopicChannelDetails.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TopicChannelDetails & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TopicChannelDetails & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/Transcript.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Transcript.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/Transcript.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/Transcript.md index a47c791c..7e827c6c 100644 --- a/docs/api/namespaces/YTNodes/classes/Transcript.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Transcript.md @@ -1,42 +1,42 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / Transcript +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Transcript # Class: Transcript +Defined in: [src/parser/classes/Transcript.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Transcript.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new Transcript() +### Constructor -> **new Transcript**(`data`): [`Transcript`](Transcript.md) +> **new Transcript**(`data`): `Transcript` + +Defined in: [src/parser/classes/Transcript.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Transcript.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`Transcript`](Transcript.md) +`Transcript` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/Transcript.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Transcript.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties ### content -> **content**: `null` \| [`TranscriptSearchPanel`](TranscriptSearchPanel.md) +> **content**: [`TranscriptSearchPanel`](TranscriptSearchPanel.md) \| `null` -#### Defined in - -[src/parser/classes/Transcript.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Transcript.ts#L9) +Defined in: [src/parser/classes/Transcript.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Transcript.ts#L9) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'Transcript'` +Defined in: [src/parser/classes/Transcript.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Transcript.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/Transcript.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/Transcript.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is Transcript & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptFooter.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptFooter.md new file mode 100644 index 00000000..c8853f21 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptFooter.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TranscriptFooter + +# Class: TranscriptFooter + +Defined in: [src/parser/classes/TranscriptFooter.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptFooter.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TranscriptFooter**(`data`): `TranscriptFooter` + +Defined in: [src/parser/classes/TranscriptFooter.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptFooter.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TranscriptFooter` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### language\_menu + +> **language\_menu**: [`SortFilterSubMenu`](SortFilterSubMenu.md) \| `null` + +Defined in: [src/parser/classes/TranscriptFooter.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptFooter.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TranscriptFooter'` + +Defined in: [src/parser/classes/TranscriptFooter.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptFooter.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TranscriptFooter & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TranscriptFooter & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSearchBox.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSearchBox.md new file mode 100644 index 00000000..01b53a2e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSearchBox.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TranscriptSearchBox + +# Class: TranscriptSearchBox + +Defined in: [src/parser/classes/TranscriptSearchBox.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchBox.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TranscriptSearchBox**(`data`): `TranscriptSearchBox` + +Defined in: [src/parser/classes/TranscriptSearchBox.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchBox.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TranscriptSearchBox` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### clear\_button + +> **clear\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/TranscriptSearchBox.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchBox.ts#L12) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/TranscriptSearchBox.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchBox.ts#L13) + +*** + +### formatted\_placeholder + +> **formatted\_placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TranscriptSearchBox.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchBox.ts#L11) + +*** + +### search\_button + +> **search\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/TranscriptSearchBox.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchBox.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TranscriptSearchBox'` + +Defined in: [src/parser/classes/TranscriptSearchBox.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchBox.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TranscriptSearchBox & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TranscriptSearchBox & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSearchPanel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSearchPanel.md new file mode 100644 index 00000000..53f6c07e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSearchPanel.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TranscriptSearchPanel + +# Class: TranscriptSearchPanel + +Defined in: [src/parser/classes/TranscriptSearchPanel.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchPanel.ts#L8) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TranscriptSearchPanel**(`data`): `TranscriptSearchPanel` + +Defined in: [src/parser/classes/TranscriptSearchPanel.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchPanel.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TranscriptSearchPanel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### body + +> **body**: [`TranscriptSegmentList`](TranscriptSegmentList.md) \| `null` + +Defined in: [src/parser/classes/TranscriptSearchPanel.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchPanel.ts#L12) + +*** + +### footer + +> **footer**: [`TranscriptFooter`](TranscriptFooter.md) \| `null` + +Defined in: [src/parser/classes/TranscriptSearchPanel.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchPanel.ts#L13) + +*** + +### header + +> **header**: [`TranscriptSearchBox`](TranscriptSearchBox.md) \| `null` + +Defined in: [src/parser/classes/TranscriptSearchPanel.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchPanel.ts#L11) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/TranscriptSearchPanel.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchPanel.ts#L14) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TranscriptSearchPanel'` + +Defined in: [src/parser/classes/TranscriptSearchPanel.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSearchPanel.ts#L9) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TranscriptSearchPanel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TranscriptSearchPanel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSectionHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSectionHeader.md new file mode 100644 index 00000000..ee7163c7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSectionHeader.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TranscriptSectionHeader + +# Class: TranscriptSectionHeader + +Defined in: [src/parser/classes/TranscriptSectionHeader.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSectionHeader.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TranscriptSectionHeader**(`data`): `TranscriptSectionHeader` + +Defined in: [src/parser/classes/TranscriptSectionHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSectionHeader.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TranscriptSectionHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### end\_ms + +> **end\_ms**: `string` + +Defined in: [src/parser/classes/TranscriptSectionHeader.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSectionHeader.ts#L9) + +*** + +### snippet + +> **snippet**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TranscriptSectionHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSectionHeader.ts#L10) + +*** + +### start\_ms + +> **start\_ms**: `string` + +Defined in: [src/parser/classes/TranscriptSectionHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSectionHeader.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TranscriptSectionHeader'` + +Defined in: [src/parser/classes/TranscriptSectionHeader.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSectionHeader.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TranscriptSectionHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TranscriptSectionHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSegment.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSegment.md new file mode 100644 index 00000000..a03d880f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSegment.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TranscriptSegment + +# Class: TranscriptSegment + +Defined in: [src/parser/classes/TranscriptSegment.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegment.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TranscriptSegment**(`data`): `TranscriptSegment` + +Defined in: [src/parser/classes/TranscriptSegment.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegment.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TranscriptSegment` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### end\_ms + +> **end\_ms**: `string` + +Defined in: [src/parser/classes/TranscriptSegment.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegment.ts#L9) + +*** + +### snippet + +> **snippet**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TranscriptSegment.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegment.ts#L10) + +*** + +### start\_ms + +> **start\_ms**: `string` + +Defined in: [src/parser/classes/TranscriptSegment.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegment.ts#L8) + +*** + +### start\_time\_text + +> **start\_time\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TranscriptSegment.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegment.ts#L11) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/TranscriptSegment.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegment.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TranscriptSegment'` + +Defined in: [src/parser/classes/TranscriptSegment.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegment.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TranscriptSegment & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TranscriptSegment & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSegmentList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSegmentList.md new file mode 100644 index 00000000..e06f466d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TranscriptSegmentList.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TranscriptSegmentList + +# Class: TranscriptSegmentList + +Defined in: [src/parser/classes/TranscriptSegmentList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegmentList.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TranscriptSegmentList**(`data`): `TranscriptSegmentList` + +Defined in: [src/parser/classes/TranscriptSegmentList.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegmentList.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TranscriptSegmentList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### initial\_segments + +> **initial\_segments**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`TranscriptSectionHeader`](TranscriptSectionHeader.md) \| [`TranscriptSegment`](TranscriptSegment.md)\> + +Defined in: [src/parser/classes/TranscriptSegmentList.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegmentList.ts#L12) + +*** + +### no\_result\_label + +> **no\_result\_label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TranscriptSegmentList.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegmentList.ts#L13) + +*** + +### retry\_label + +> **retry\_label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/TranscriptSegmentList.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegmentList.ts#L14) + +*** + +### touch\_captions\_enabled + +> **touch\_captions\_enabled**: `boolean` + +Defined in: [src/parser/classes/TranscriptSegmentList.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegmentList.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TranscriptSegmentList'` + +Defined in: [src/parser/classes/TranscriptSegmentList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TranscriptSegmentList.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TranscriptSegmentList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TranscriptSegmentList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnBrowseResults.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnBrowseResults.md new file mode 100644 index 00000000..dd998350 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnBrowseResults.md @@ -0,0 +1,235 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TwoColumnBrowseResults + +# Class: TwoColumnBrowseResults + +Defined in: [src/parser/classes/TwoColumnBrowseResults.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnBrowseResults.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`WatchNextTabbedResults`](WatchNextTabbedResults.md) + +## Constructors + +### Constructor + +> **new TwoColumnBrowseResults**(`data`): `TwoColumnBrowseResults` + +Defined in: [src/parser/classes/TwoColumnBrowseResults.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnBrowseResults.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TwoColumnBrowseResults` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### secondary\_contents + +> **secondary\_contents**: [`SectionList`](SectionList.md) \| [`BrowseFeedActions`](BrowseFeedActions.md) \| [`ProfileColumn`](ProfileColumn.md) \| `null` + +Defined in: [src/parser/classes/TwoColumnBrowseResults.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnBrowseResults.ts#L14) + +*** + +### tabs + +> **tabs**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Tab`](Tab.md) \| [`ExpandableTab`](ExpandableTab.md)\> + +Defined in: [src/parser/classes/TwoColumnBrowseResults.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnBrowseResults.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TwoColumnBrowseResults'` + +Defined in: [src/parser/classes/TwoColumnBrowseResults.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnBrowseResults.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TwoColumnBrowseResults & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TwoColumnBrowseResults & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnSearchResults.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnSearchResults.md new file mode 100644 index 00000000..af57e888 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnSearchResults.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TwoColumnSearchResults + +# Class: TwoColumnSearchResults + +Defined in: [src/parser/classes/TwoColumnSearchResults.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnSearchResults.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new TwoColumnSearchResults**(`data`): `TwoColumnSearchResults` + +Defined in: [src/parser/classes/TwoColumnSearchResults.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnSearchResults.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`TwoColumnSearchResults` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### header + +> **header**: [`YTNode`](../../Helpers/classes/YTNode.md) \| `null` + +Defined in: [src/parser/classes/TwoColumnSearchResults.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnSearchResults.ts#L10) + +*** + +### primary\_contents + +> **primary\_contents**: [`SectionList`](SectionList.md) \| [`RichGrid`](RichGrid.md) \| `null` + +Defined in: [src/parser/classes/TwoColumnSearchResults.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnSearchResults.ts#L11) + +*** + +### secondary\_contents + +> **secondary\_contents**: [`SecondarySearchContainer`](SecondarySearchContainer.md) \| `null` + +Defined in: [src/parser/classes/TwoColumnSearchResults.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnSearchResults.ts#L12) + +*** + +### target\_id? + +> `optional` **target\_id**: `string` + +Defined in: [src/parser/classes/TwoColumnSearchResults.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnSearchResults.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'TwoColumnSearchResults'` + +Defined in: [src/parser/classes/TwoColumnSearchResults.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnSearchResults.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is TwoColumnSearchResults & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is TwoColumnSearchResults & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/TwoColumnWatchNextResults.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnWatchNextResults.md similarity index 52% rename from docs/api/namespaces/YTNodes/classes/TwoColumnWatchNextResults.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnWatchNextResults.md index 45878a7d..45ac2023 100644 --- a/docs/api/namespaces/YTNodes/classes/TwoColumnWatchNextResults.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/TwoColumnWatchNextResults.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / TwoColumnWatchNextResults +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / TwoColumnWatchNextResults # Class: TwoColumnWatchNextResults +Defined in: [src/parser/classes/TwoColumnWatchNextResults.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnWatchNextResults.ts#L13) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new TwoColumnWatchNextResults() +### Constructor -> **new TwoColumnWatchNextResults**(`data`): [`TwoColumnWatchNextResults`](TwoColumnWatchNextResults.md) +> **new TwoColumnWatchNextResults**(`data`): `TwoColumnWatchNextResults` + +Defined in: [src/parser/classes/TwoColumnWatchNextResults.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnWatchNextResults.ts#L34) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`TwoColumnWatchNextResults`](TwoColumnWatchNextResults.md) +`TwoColumnWatchNextResults` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/TwoColumnWatchNextResults.ts:34](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnWatchNextResults.ts#L34) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,6 +36,8 @@ > `optional` **autoplay**: `object` +Defined in: [src/parser/classes/TwoColumnWatchNextResults.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnWatchNextResults.ts#L28) + #### count\_down\_secs? > `optional` **count\_down\_secs**: `number` @@ -46,19 +50,13 @@ > **sets**: `AutoplaySet`[] -#### Defined in - -[src/parser/classes/TwoColumnWatchNextResults.ts:28](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnWatchNextResults.ts#L28) - *** ### conversation\_bar > **conversation\_bar**: [`YTNode`](../../Helpers/classes/YTNode.md) -#### Defined in - -[src/parser/classes/TwoColumnWatchNextResults.ts:18](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnWatchNextResults.ts#L18) +Defined in: [src/parser/classes/TwoColumnWatchNextResults.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnWatchNextResults.ts#L18) *** @@ -66,6 +64,8 @@ > `optional` **playlist**: `object` +Defined in: [src/parser/classes/TwoColumnWatchNextResults.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnWatchNextResults.ts#L19) + #### author > **author**: [`Text`](../../Misc/classes/Text.md) \| [`Author`](../../Misc/classes/Author.md) @@ -88,25 +88,19 @@ #### menu -> **menu**: `null` \| [`Menu`](Menu.md) +> **menu**: [`Menu`](Menu.md) \| `null` #### title > **title**: `string` -#### Defined in - -[src/parser/classes/TwoColumnWatchNextResults.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnWatchNextResults.ts#L19) - *** ### results > **results**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/TwoColumnWatchNextResults.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnWatchNextResults.ts#L16) +Defined in: [src/parser/classes/TwoColumnWatchNextResults.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnWatchNextResults.ts#L16) *** @@ -114,9 +108,7 @@ > **secondary\_results**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/TwoColumnWatchNextResults.ts:17](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnWatchNextResults.ts#L17) +Defined in: [src/parser/classes/TwoColumnWatchNextResults.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnWatchNextResults.ts#L17) *** @@ -124,45 +116,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'TwoColumnWatchNextResults'` +Defined in: [src/parser/classes/TwoColumnWatchNextResults.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnWatchNextResults.ts#L14) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/TwoColumnWatchNextResults.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnWatchNextResults.ts#L14) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -180,27 +176,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is TwoColumnWatchNextResults & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -214,27 +214,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -248,27 +252,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -285,7 +293,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UnifiedSharePanel.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UnifiedSharePanel.md new file mode 100644 index 00000000..2c8419d0 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UnifiedSharePanel.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UnifiedSharePanel + +# Class: UnifiedSharePanel + +Defined in: [src/parser/classes/UnifiedSharePanel.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UnifiedSharePanel.ts#L15) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UnifiedSharePanel**(`data`): `UnifiedSharePanel` + +Defined in: [src/parser/classes/UnifiedSharePanel.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UnifiedSharePanel.ts#L23) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UnifiedSharePanel` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### header + +> **header**: [`SharePanelHeader`](SharePanelHeader.md) \| `null` + +Defined in: [src/parser/classes/UnifiedSharePanel.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UnifiedSharePanel.ts#L19) + +*** + +### share\_panel\_version + +> **share\_panel\_version**: `number` + +Defined in: [src/parser/classes/UnifiedSharePanel.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UnifiedSharePanel.ts#L20) + +*** + +### show\_loading\_spinner? + +> `optional` **show\_loading\_spinner**: `boolean` + +Defined in: [src/parser/classes/UnifiedSharePanel.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UnifiedSharePanel.ts#L21) + +*** + +### third\_party\_network\_section? + +> `optional` **third\_party\_network\_section**: `ThirdPartyNetworkSection` + +Defined in: [src/parser/classes/UnifiedSharePanel.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UnifiedSharePanel.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UnifiedSharePanel'` + +Defined in: [src/parser/classes/UnifiedSharePanel.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UnifiedSharePanel.ts#L16) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UnifiedSharePanel & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UnifiedSharePanel & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UniversalWatchCard.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UniversalWatchCard.md new file mode 100644 index 00000000..cb3e9f92 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UniversalWatchCard.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UniversalWatchCard + +# Class: UniversalWatchCard + +Defined in: [src/parser/classes/UniversalWatchCard.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UniversalWatchCard.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UniversalWatchCard**(`data`): `UniversalWatchCard` + +Defined in: [src/parser/classes/UniversalWatchCard.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UniversalWatchCard.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UniversalWatchCard` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### call\_to\_action + +> **call\_to\_action**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/UniversalWatchCard.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UniversalWatchCard.ts#L9) + +*** + +### collapsed\_label? + +> `optional` **collapsed\_label**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/UniversalWatchCard.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UniversalWatchCard.ts#L11) + +*** + +### header + +> **header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/UniversalWatchCard.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UniversalWatchCard.ts#L8) + +*** + +### sections + +> **sections**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/UniversalWatchCard.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UniversalWatchCard.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UniversalWatchCard'` + +Defined in: [src/parser/classes/UniversalWatchCard.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UniversalWatchCard.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UniversalWatchCard & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UniversalWatchCard & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UnsubscribeEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UnsubscribeEndpoint.md new file mode 100644 index 00000000..313982d9 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UnsubscribeEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UnsubscribeEndpoint + +# Class: UnsubscribeEndpoint + +Defined in: [src/parser/classes/endpoints/UnsubscribeEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/UnsubscribeEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`UnsubscribeRequest`](../../../../type-aliases/UnsubscribeRequest.md)\> + +## Constructors + +### Constructor + +> **new UnsubscribeEndpoint**(`data`): `UnsubscribeEndpoint` + +Defined in: [src/parser/classes/endpoints/UnsubscribeEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/UnsubscribeEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UnsubscribeEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UnsubscribeEndpoint'` + +Defined in: [src/parser/classes/endpoints/UnsubscribeEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/UnsubscribeEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`UnsubscribeRequest`](../../../../type-aliases/UnsubscribeRequest.md) + +Defined in: [src/parser/classes/endpoints/UnsubscribeEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/UnsubscribeEndpoint.ts#L20) + +#### Returns + +[`UnsubscribeRequest`](../../../../type-aliases/UnsubscribeRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/UnsubscribeEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/UnsubscribeEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UnsubscribeEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UnsubscribeEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateChannelSwitcherPageAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateChannelSwitcherPageAction.md new file mode 100644 index 00000000..e5f8e68a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateChannelSwitcherPageAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateChannelSwitcherPageAction + +# Class: UpdateChannelSwitcherPageAction + +Defined in: [src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateChannelSwitcherPageAction**(`data`): `UpdateChannelSwitcherPageAction` + +Defined in: [src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateChannelSwitcherPageAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### contents? + +> `optional` **contents**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> \| `null` + +Defined in: [src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts#L10) + +*** + +### header? + +> `optional` **header**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpdateChannelSwitcherPageAction'` + +Defined in: [src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateChannelSwitcherPageAction.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateChannelSwitcherPageAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateChannelSwitcherPageAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateDateTextAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateDateTextAction.md new file mode 100644 index 00000000..018f1df8 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateDateTextAction.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateDateTextAction + +# Class: UpdateDateTextAction + +Defined in: [src/parser/classes/livechat/UpdateDateTextAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateDateTextAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateDateTextAction**(`data`): `UpdateDateTextAction` + +Defined in: [src/parser/classes/livechat/UpdateDateTextAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateDateTextAction.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateDateTextAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### date\_text + +> **date\_text**: `string` + +Defined in: [src/parser/classes/livechat/UpdateDateTextAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateDateTextAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpdateDateTextAction'` + +Defined in: [src/parser/classes/livechat/UpdateDateTextAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateDateTextAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateDateTextAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateDateTextAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateDescriptionAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateDescriptionAction.md new file mode 100644 index 00000000..8f784703 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateDescriptionAction.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateDescriptionAction + +# Class: UpdateDescriptionAction + +Defined in: [src/parser/classes/livechat/UpdateDescriptionAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateDescriptionAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateDescriptionAction**(`data`): `UpdateDescriptionAction` + +Defined in: [src/parser/classes/livechat/UpdateDescriptionAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateDescriptionAction.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateDescriptionAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/UpdateDescriptionAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateDescriptionAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpdateDescriptionAction'` + +Defined in: [src/parser/classes/livechat/UpdateDescriptionAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateDescriptionAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateDescriptionAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateDescriptionAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateEngagementPanelAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateEngagementPanelAction.md new file mode 100644 index 00000000..5e79b7df --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateEngagementPanelAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateEngagementPanelAction + +# Class: UpdateEngagementPanelAction + +Defined in: [src/parser/classes/actions/UpdateEngagementPanelAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateEngagementPanelAction.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateEngagementPanelAction**(`data`): `UpdateEngagementPanelAction` + +Defined in: [src/parser/classes/actions/UpdateEngagementPanelAction.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateEngagementPanelAction.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateEngagementPanelAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content + +> **content**: [`Transcript`](Transcript.md) \| `null` + +Defined in: [src/parser/classes/actions/UpdateEngagementPanelAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateEngagementPanelAction.ts#L10) + +*** + +### target\_id + +> **target\_id**: `string` + +Defined in: [src/parser/classes/actions/UpdateEngagementPanelAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateEngagementPanelAction.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpdateEngagementPanelAction'` + +Defined in: [src/parser/classes/actions/UpdateEngagementPanelAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateEngagementPanelAction.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateEngagementPanelAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateEngagementPanelAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateEngagementPanelContentCommand.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateEngagementPanelContentCommand.md new file mode 100644 index 00000000..9c41ff04 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateEngagementPanelContentCommand.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateEngagementPanelContentCommand + +# Class: UpdateEngagementPanelContentCommand + +Defined in: [src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateEngagementPanelContentCommand**(`data`): `UpdateEngagementPanelContentCommand` + +Defined in: [src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateEngagementPanelContentCommand` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### content\_source\_panel\_identifier? + +> `optional` **content\_source\_panel\_identifier**: `Identifier` + +Defined in: [src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts#L12) + +*** + +### target\_panel\_identifier? + +> `optional` **target\_panel\_identifier**: `Identifier` + +Defined in: [src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpdateEngagementPanelContentCommand'` + +Defined in: [src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/commands/UpdateEngagementPanelContentCommand.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateEngagementPanelContentCommand & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateEngagementPanelContentCommand & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateLiveChatPollAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateLiveChatPollAction.md new file mode 100644 index 00000000..11e3931e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateLiveChatPollAction.md @@ -0,0 +1,223 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateLiveChatPollAction + +# Class: UpdateLiveChatPollAction + +Defined in: [src/parser/classes/livechat/UpdateLiveChatPollAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateLiveChatPollAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateLiveChatPollAction**(`data`): `UpdateLiveChatPollAction` + +Defined in: [src/parser/classes/livechat/UpdateLiveChatPollAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateLiveChatPollAction.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateLiveChatPollAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### poll\_to\_update + +> **poll\_to\_update**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/livechat/UpdateLiveChatPollAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateLiveChatPollAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpdateLiveChatPollAction'` + +Defined in: [src/parser/classes/livechat/UpdateLiveChatPollAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateLiveChatPollAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateLiveChatPollAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateLiveChatPollAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateSubscribeButtonAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateSubscribeButtonAction.md new file mode 100644 index 00000000..63d86e81 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateSubscribeButtonAction.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateSubscribeButtonAction + +# Class: UpdateSubscribeButtonAction + +Defined in: [src/parser/classes/actions/UpdateSubscribeButtonAction.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateSubscribeButtonAction.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateSubscribeButtonAction**(`data`): `UpdateSubscribeButtonAction` + +Defined in: [src/parser/classes/actions/UpdateSubscribeButtonAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateSubscribeButtonAction.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateSubscribeButtonAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### channel\_id + +> **channel\_id**: `string` + +Defined in: [src/parser/classes/actions/UpdateSubscribeButtonAction.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateSubscribeButtonAction.ts#L7) + +*** + +### subscribed + +> **subscribed**: `boolean` + +Defined in: [src/parser/classes/actions/UpdateSubscribeButtonAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateSubscribeButtonAction.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpdateSubscribeButtonAction'` + +Defined in: [src/parser/classes/actions/UpdateSubscribeButtonAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/actions/UpdateSubscribeButtonAction.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateSubscribeButtonAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateSubscribeButtonAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/UpdateTitleAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateTitleAction.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/UpdateTitleAction.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateTitleAction.md index fed58f40..82164bf5 100644 --- a/docs/api/namespaces/YTNodes/classes/UpdateTitleAction.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateTitleAction.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / UpdateTitleAction +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateTitleAction # Class: UpdateTitleAction +Defined in: [src/parser/classes/livechat/UpdateTitleAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateTitleAction.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new UpdateTitleAction() +### Constructor -> **new UpdateTitleAction**(`data`): [`UpdateTitleAction`](UpdateTitleAction.md) +> **new UpdateTitleAction**(`data`): `UpdateTitleAction` + +Defined in: [src/parser/classes/livechat/UpdateTitleAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateTitleAction.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`UpdateTitleAction`](UpdateTitleAction.md) +`UpdateTitleAction` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/livechat/UpdateTitleAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/livechat/UpdateTitleAction.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/livechat/UpdateTitleAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/livechat/UpdateTitleAction.ts#L8) +Defined in: [src/parser/classes/livechat/UpdateTitleAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateTitleAction.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'UpdateTitleAction'` +Defined in: [src/parser/classes/livechat/UpdateTitleAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateTitleAction.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/livechat/UpdateTitleAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/livechat/UpdateTitleAction.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is UpdateTitleAction & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateToggleButtonTextAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateToggleButtonTextAction.md new file mode 100644 index 00000000..cd87bd9e --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateToggleButtonTextAction.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateToggleButtonTextAction + +# Class: UpdateToggleButtonTextAction + +Defined in: [src/parser/classes/livechat/UpdateToggleButtonTextAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateToggleButtonTextAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateToggleButtonTextAction**(`data`): `UpdateToggleButtonTextAction` + +Defined in: [src/parser/classes/livechat/UpdateToggleButtonTextAction.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateToggleButtonTextAction.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateToggleButtonTextAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### button\_id + +> **button\_id**: `string` + +Defined in: [src/parser/classes/livechat/UpdateToggleButtonTextAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateToggleButtonTextAction.ts#L10) + +*** + +### default\_text + +> **default\_text**: `string` + +Defined in: [src/parser/classes/livechat/UpdateToggleButtonTextAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateToggleButtonTextAction.ts#L8) + +*** + +### toggled\_text + +> **toggled\_text**: `string` + +Defined in: [src/parser/classes/livechat/UpdateToggleButtonTextAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateToggleButtonTextAction.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpdateToggleButtonTextAction'` + +Defined in: [src/parser/classes/livechat/UpdateToggleButtonTextAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateToggleButtonTextAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateToggleButtonTextAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateToggleButtonTextAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateViewershipAction.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateViewershipAction.md new file mode 100644 index 00000000..092dd81d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpdateViewershipAction.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpdateViewershipAction + +# Class: UpdateViewershipAction + +Defined in: [src/parser/classes/livechat/UpdateViewershipAction.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateViewershipAction.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpdateViewershipAction**(`data`): `UpdateViewershipAction` + +Defined in: [src/parser/classes/livechat/UpdateViewershipAction.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateViewershipAction.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpdateViewershipAction` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### extra\_short\_view\_count + +> **extra\_short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/UpdateViewershipAction.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateViewershipAction.ts#L9) + +*** + +### is\_live + +> **is\_live**: `boolean` + +Defined in: [src/parser/classes/livechat/UpdateViewershipAction.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateViewershipAction.ts#L12) + +*** + +### original\_view\_count + +> **original\_view\_count**: `number` + +Defined in: [src/parser/classes/livechat/UpdateViewershipAction.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateViewershipAction.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### unlabeled\_view\_count\_value + +> **unlabeled\_view\_count\_value**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/UpdateViewershipAction.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateViewershipAction.ts#L11) + +*** + +### view\_count + +> **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/livechat/UpdateViewershipAction.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateViewershipAction.ts#L8) + +*** + +### type + +> `static` **type**: `string` = `'UpdateViewershipAction'` + +Defined in: [src/parser/classes/livechat/UpdateViewershipAction.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/livechat/UpdateViewershipAction.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpdateViewershipAction & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpdateViewershipAction & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/UploadTimeFactoid.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UploadTimeFactoid.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/UploadTimeFactoid.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/UploadTimeFactoid.md index 3b943a16..5c41f3d2 100644 --- a/docs/api/namespaces/YTNodes/classes/UploadTimeFactoid.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UploadTimeFactoid.md @@ -1,42 +1,42 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / UploadTimeFactoid +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UploadTimeFactoid # Class: UploadTimeFactoid +Defined in: [src/parser/classes/UploadTimeFactoid.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UploadTimeFactoid.ts#L6) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new UploadTimeFactoid() +### Constructor -> **new UploadTimeFactoid**(`data`): [`UploadTimeFactoid`](UploadTimeFactoid.md) +> **new UploadTimeFactoid**(`data`): `UploadTimeFactoid` + +Defined in: [src/parser/classes/UploadTimeFactoid.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UploadTimeFactoid.ts#L11) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`UploadTimeFactoid`](UploadTimeFactoid.md) +`UploadTimeFactoid` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/UploadTimeFactoid.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/UploadTimeFactoid.ts#L11) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties ### factoid -> **factoid**: `null` \| [`Factoid`](Factoid.md) +> **factoid**: [`Factoid`](Factoid.md) \| `null` -#### Defined in - -[src/parser/classes/UploadTimeFactoid.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/UploadTimeFactoid.ts#L9) +Defined in: [src/parser/classes/UploadTimeFactoid.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UploadTimeFactoid.ts#L9) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'UploadTimeFactoid'` +Defined in: [src/parser/classes/UploadTimeFactoid.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UploadTimeFactoid.ts#L7) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/UploadTimeFactoid.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/UploadTimeFactoid.ts#L7) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is UploadTimeFactoid & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/UpsellDialog.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpsellDialog.md new file mode 100644 index 00000000..dd0bc062 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/UpsellDialog.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / UpsellDialog + +# Class: UpsellDialog + +Defined in: [src/parser/classes/UpsellDialog.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UpsellDialog.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new UpsellDialog**(`data`): `UpsellDialog` + +Defined in: [src/parser/classes/UpsellDialog.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UpsellDialog.ts#L15) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`UpsellDialog` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### action\_button + +> **action\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/UpsellDialog.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UpsellDialog.ts#L11) + +*** + +### dismiss\_button + +> **dismiss\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/UpsellDialog.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UpsellDialog.ts#L12) + +*** + +### is\_visible + +> **is\_visible**: `boolean` + +Defined in: [src/parser/classes/UpsellDialog.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UpsellDialog.ts#L13) + +*** + +### message\_text + +> **message\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/UpsellDialog.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UpsellDialog.ts#L10) + +*** + +### message\_title + +> **message\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/UpsellDialog.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UpsellDialog.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'UpsellDialog'` + +Defined in: [src/parser/classes/UpsellDialog.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/UpsellDialog.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is UpsellDialog & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is UpsellDialog & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VerticalList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VerticalList.md new file mode 100644 index 00000000..221d6d36 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VerticalList.md @@ -0,0 +1,253 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VerticalList + +# Class: VerticalList + +Defined in: [src/parser/classes/VerticalList.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalList.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VerticalList**(`data`): `VerticalList` + +Defined in: [src/parser/classes/VerticalList.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalList.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VerticalList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### collapsed\_item\_count + +> **collapsed\_item\_count**: `string` + +Defined in: [src/parser/classes/VerticalList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalList.ts#L9) + +*** + +### collapsed\_state\_button\_text + +> **collapsed\_state\_button\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VerticalList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalList.ts#L10) + +*** + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/VerticalList.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalList.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'VerticalList'` + +Defined in: [src/parser/classes/VerticalList.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalList.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/VerticalList.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalList.ts#L20) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VerticalList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VerticalList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VerticalWatchCardList.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VerticalWatchCardList.md new file mode 100644 index 00000000..1dc35fff --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VerticalWatchCardList.md @@ -0,0 +1,253 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VerticalWatchCardList + +# Class: VerticalWatchCardList + +Defined in: [src/parser/classes/VerticalWatchCardList.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalWatchCardList.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VerticalWatchCardList**(`data`): `VerticalWatchCardList` + +Defined in: [src/parser/classes/VerticalWatchCardList.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalWatchCardList.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VerticalWatchCardList` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### items + +> **items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/VerticalWatchCardList.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalWatchCardList.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_all\_endpoint + +> **view\_all\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/VerticalWatchCardList.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalWatchCardList.ts#L11) + +*** + +### view\_all\_text + +> **view\_all\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VerticalWatchCardList.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalWatchCardList.ts#L10) + +*** + +### type + +> `static` **type**: `string` = `'VerticalWatchCardList'` + +Defined in: [src/parser/classes/VerticalWatchCardList.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalWatchCardList.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### contents + +#### Get Signature + +> **get** **contents**(): [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/VerticalWatchCardList.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VerticalWatchCardList.ts#L21) + +##### Returns + +[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VerticalWatchCardList & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VerticalWatchCardList & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/Video.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/Video.md new file mode 100644 index 00000000..b431ae11 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/Video.md @@ -0,0 +1,573 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / Video + +# Class: Video + +Defined in: [src/parser/classes/Video.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L13) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`VideoCard`](VideoCard.md) + +## Constructors + +### Constructor + +> **new Video**(`data`): `Video` + +Defined in: [src/parser/classes/Video.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L43) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`Video` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### additional\_metadatas? + +> `optional` **additional\_metadatas**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/Video.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L22) + +*** + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/Video.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L26) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MetadataBadge`](MetadataBadge.md)\> + +Defined in: [src/parser/classes/Video.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L27) + +*** + +### byline\_text? + +> `optional` **byline\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L37) + +*** + +### description\_snippet? + +> `optional` **description\_snippet**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L19) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Video.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L28) + +*** + +### expandable\_metadata + +> **expandable\_metadata**: [`ExpandableMetadata`](ExpandableMetadata.md) \| `null` + +Defined in: [src/parser/classes/Video.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L21) + +*** + +### is\_watched + +> **is\_watched**: `boolean` + +Defined in: [src/parser/classes/Video.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L35) + +*** + +### length\_text? + +> `optional` **length\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L33) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/Video.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L36) + +*** + +### published? + +> `optional` **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L29) + +*** + +### rich\_thumbnail? + +> `optional` **rich\_thumbnail**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/Video.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L25) + +*** + +### search\_video\_result\_entity\_key? + +> `optional` **search\_video\_result\_entity\_key**: `string` + +Defined in: [src/parser/classes/Video.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L38) + +*** + +### service\_endpoint? + +> `optional` **service\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Video.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L40) + +*** + +### service\_endpoints? + +> `optional` **service\_endpoints**: [`NavigationEndpoint`](NavigationEndpoint.md)[] + +Defined in: [src/parser/classes/Video.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L39) + +*** + +### short\_view\_count? + +> `optional` **short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L31) + +*** + +### show\_action\_menu + +> **show\_action\_menu**: `boolean` + +Defined in: [src/parser/classes/Video.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L34) + +*** + +### snippets? + +> `optional` **snippets**: `object`[] + +Defined in: [src/parser/classes/Video.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L20) + +#### hover\_text + +> **hover\_text**: [`Text`](../../Misc/classes/Text.md) + +#### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +*** + +### style? + +> `optional` **style**: `"VIDEO_STYLE_TYPE_UNKNOWN"` \| `"VIDEO_STYLE_TYPE_NORMAL"` \| `"VIDEO_STYLE_TYPE_POST"` \| `"VIDEO_STYLE_TYPE_SUB"` \| `"VIDEO_STYLE_TYPE_LIVE_POST"` \| `"VIDEO_STYLE_TYPE_FULL_BLEED_ISOLATED"` \| `"VIDEO_STYLE_TYPE_WITH_EXPANDED_METADATA"` + +Defined in: [src/parser/classes/Video.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L41) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Video.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L24) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/Video.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L23) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L17) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### untranslated\_title? + +> `optional` **untranslated\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L18) + +*** + +### upcoming? + +> `optional` **upcoming**: `Date` + +Defined in: [src/parser/classes/Video.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L32) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/Video.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L16) + +*** + +### view\_count? + +> `optional` **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L30) + +*** + +### type + +> `static` **type**: `string` = `'Video'` + +Defined in: [src/parser/classes/Video.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L14) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Accessors + +### best\_thumbnail + +#### Get Signature + +> **get** **best\_thumbnail**(): [`Thumbnail`](../../Misc/classes/Thumbnail.md) \| `undefined` + +Defined in: [src/parser/classes/Video.ts:148](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L148) + +##### Returns + +[`Thumbnail`](../../Misc/classes/Thumbnail.md) \| `undefined` + +*** + +### description + +#### Get Signature + +> **get** **description**(): `string` + +Defined in: [src/parser/classes/Video.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L119) + +##### Returns + +`string` + +*** + +### duration + +#### Get Signature + +> **get** **duration**(): `object` + +Defined in: [src/parser/classes/Video.ts:152](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L152) + +##### Returns + +`object` + +###### seconds + +> **seconds**: `number` + +###### text + +> **text**: `string` \| `undefined` = `length_text` + +*** + +### has\_captions + +#### Get Signature + +> **get** **has\_captions**(): `boolean` + +Defined in: [src/parser/classes/Video.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L144) + +##### Returns + +`boolean` + +*** + +### id + +#### Get Signature + +> **get** **id**(): `string` + +Defined in: [src/parser/classes/Video.ts:115](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L115) + +##### Deprecated + +Use [`video_id`](#video_id) instead. + +##### Returns + +`string` + +*** + +### is\_4k + +#### Get Signature + +> **get** **is\_4k**(): `boolean` + +Defined in: [src/parser/classes/Video.ts:140](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L140) + +##### Returns + +`boolean` + +*** + +### is\_live + +#### Get Signature + +> **get** **is\_live**(): `boolean` + +Defined in: [src/parser/classes/Video.ts:125](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L125) + +##### Returns + +`boolean` + +*** + +### is\_premiere + +#### Get Signature + +> **get** **is\_premiere**(): `boolean` + +Defined in: [src/parser/classes/Video.ts:136](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L136) + +##### Returns + +`boolean` + +*** + +### is\_upcoming + +#### Get Signature + +> **get** **is\_upcoming**(): `boolean` \| `undefined` + +Defined in: [src/parser/classes/Video.ts:132](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L132) + +##### Returns + +`boolean` \| `undefined` + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is Video & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is Video & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoAttributeView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoAttributeView.md new file mode 100644 index 00000000..61d22e2b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoAttributeView.md @@ -0,0 +1,291 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoAttributeView + +# Class: VideoAttributeView + +Defined in: [src/parser/classes/VideoAttributeView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoAttributeView**(`data`): `VideoAttributeView` + +Defined in: [src/parser/classes/VideoAttributeView.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L25) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoAttributeView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### image + +> **image**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] \| [`ContentPreviewImageView`](ContentPreviewImageView.md) \| `null` + +Defined in: [src/parser/classes/VideoAttributeView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L13) + +*** + +### image\_style + +> **image\_style**: `string` + +Defined in: [src/parser/classes/VideoAttributeView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L14) + +*** + +### orientation + +> **orientation**: `string` + +Defined in: [src/parser/classes/VideoAttributeView.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L20) + +*** + +### overflow\_menu\_a11y\_label + +> **overflow\_menu\_a11y\_label**: `string` + +Defined in: [src/parser/classes/VideoAttributeView.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L23) + +*** + +### overflow\_menu\_on\_tap + +> **overflow\_menu\_on\_tap**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/VideoAttributeView.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L22) + +*** + +### secondary\_subtitle? + +> `optional` **secondary\_subtitle**: `object` + +Defined in: [src/parser/classes/VideoAttributeView.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L17) + +#### content + +> **content**: `string` + +*** + +### sizing\_rule + +> **sizing\_rule**: `string` + +Defined in: [src/parser/classes/VideoAttributeView.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L21) + +*** + +### subtitle + +> **subtitle**: `string` + +Defined in: [src/parser/classes/VideoAttributeView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L16) + +*** + +### title + +> **title**: `string` + +Defined in: [src/parser/classes/VideoAttributeView.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'VideoAttributeView'` + +Defined in: [src/parser/classes/VideoAttributeView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributeView.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoAttributeView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoAttributeView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoAttributesSectionView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoAttributesSectionView.md new file mode 100644 index 00000000..f6336f4f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoAttributesSectionView.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoAttributesSectionView + +# Class: VideoAttributesSectionView + +Defined in: [src/parser/classes/VideoAttributesSectionView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributesSectionView.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoAttributesSectionView**(`data`): `VideoAttributesSectionView` + +Defined in: [src/parser/classes/VideoAttributesSectionView.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributesSectionView.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoAttributesSectionView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### header\_subtitle + +> **header\_subtitle**: `string` + +Defined in: [src/parser/classes/VideoAttributesSectionView.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributesSectionView.ts#L11) + +*** + +### header\_title + +> **header\_title**: `string` + +Defined in: [src/parser/classes/VideoAttributesSectionView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributesSectionView.ts#L10) + +*** + +### next\_button + +> **next\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/VideoAttributesSectionView.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributesSectionView.ts#L14) + +*** + +### previous\_button + +> **previous\_button**: [`ButtonView`](ButtonView.md) \| `null` + +Defined in: [src/parser/classes/VideoAttributesSectionView.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributesSectionView.ts#L13) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_attributes + +> **video\_attributes**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`VideoAttributeView`](VideoAttributeView.md)\> + +Defined in: [src/parser/classes/VideoAttributesSectionView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributesSectionView.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'VideoAttributesSectionView'` + +Defined in: [src/parser/classes/VideoAttributesSectionView.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoAttributesSectionView.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoAttributesSectionView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoAttributesSectionView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoCard.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoCard.md new file mode 100644 index 00000000..b1a8ca97 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoCard.md @@ -0,0 +1,717 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoCard + +# Class: VideoCard + +Defined in: [src/parser/classes/VideoCard.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoCard.ts#L6) + +## Extends + +- [`Video`](Video.md) + +## Constructors + +### Constructor + +> **new VideoCard**(`data`): `VideoCard` + +Defined in: [src/parser/classes/VideoCard.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoCard.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoCard` + +#### Overrides + +[`Video`](Video.md).[`constructor`](Video.md#constructor) + +## Properties + +### additional\_metadatas? + +> `optional` **additional\_metadatas**: [`Text`](../../Misc/classes/Text.md)[] + +Defined in: [src/parser/classes/Video.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L22) + +#### Inherited from + +[`Video`](Video.md).[`additional_metadatas`](Video.md#additional_metadatas) + +*** + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/Video.ts:26](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L26) + +#### Inherited from + +[`Video`](Video.md).[`author`](Video.md#author) + +*** + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MetadataBadge`](MetadataBadge.md)\> + +Defined in: [src/parser/classes/Video.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L27) + +#### Inherited from + +[`Video`](Video.md).[`badges`](Video.md#badges) + +*** + +### byline\_text? + +> `optional` **byline\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:37](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L37) + +#### Inherited from + +[`Video`](Video.md).[`byline_text`](Video.md#byline_text) + +*** + +### description\_snippet? + +> `optional` **description\_snippet**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L19) + +#### Inherited from + +[`Video`](Video.md).[`description_snippet`](Video.md#description_snippet) + +*** + +### endpoint? + +> `optional` **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Video.ts:28](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L28) + +#### Inherited from + +[`Video`](Video.md).[`endpoint`](Video.md#endpoint) + +*** + +### expandable\_metadata + +> **expandable\_metadata**: [`ExpandableMetadata`](ExpandableMetadata.md) \| `null` + +Defined in: [src/parser/classes/Video.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L21) + +#### Inherited from + +[`Video`](Video.md).[`expandable_metadata`](Video.md#expandable_metadata) + +*** + +### is\_watched + +> **is\_watched**: `boolean` + +Defined in: [src/parser/classes/Video.ts:35](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L35) + +#### Inherited from + +[`Video`](Video.md).[`is_watched`](Video.md#is_watched) + +*** + +### length\_text? + +> `optional` **length\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:33](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L33) + +#### Inherited from + +[`Video`](Video.md).[`length_text`](Video.md#length_text) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/Video.ts:36](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L36) + +#### Inherited from + +[`Video`](Video.md).[`menu`](Video.md#menu) + +*** + +### metadata\_text? + +> `optional` **metadata\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoCard.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoCard.ts#L9) + +*** + +### published? + +> `optional` **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L29) + +#### Inherited from + +[`Video`](Video.md).[`published`](Video.md#published) + +*** + +### rich\_thumbnail? + +> `optional` **rich\_thumbnail**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/Video.ts:25](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L25) + +#### Inherited from + +[`Video`](Video.md).[`rich_thumbnail`](Video.md#rich_thumbnail) + +*** + +### search\_video\_result\_entity\_key? + +> `optional` **search\_video\_result\_entity\_key**: `string` + +Defined in: [src/parser/classes/Video.ts:38](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L38) + +#### Inherited from + +[`Video`](Video.md).[`search_video_result_entity_key`](Video.md#search_video_result_entity_key) + +*** + +### service\_endpoint? + +> `optional` **service\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/Video.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L40) + +#### Inherited from + +[`Video`](Video.md).[`service_endpoint`](Video.md#service_endpoint) + +*** + +### service\_endpoints? + +> `optional` **service\_endpoints**: [`NavigationEndpoint`](NavigationEndpoint.md)[] + +Defined in: [src/parser/classes/Video.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L39) + +#### Inherited from + +[`Video`](Video.md).[`service_endpoints`](Video.md#service_endpoints) + +*** + +### short\_view\_count? + +> `optional` **short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:31](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L31) + +#### Inherited from + +[`Video`](Video.md).[`short_view_count`](Video.md#short_view_count) + +*** + +### show\_action\_menu + +> **show\_action\_menu**: `boolean` + +Defined in: [src/parser/classes/Video.ts:34](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L34) + +#### Inherited from + +[`Video`](Video.md).[`show_action_menu`](Video.md#show_action_menu) + +*** + +### snippets? + +> `optional` **snippets**: `object`[] + +Defined in: [src/parser/classes/Video.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L20) + +#### hover\_text + +> **hover\_text**: [`Text`](../../Misc/classes/Text.md) + +#### text + +> **text**: [`Text`](../../Misc/classes/Text.md) + +#### Inherited from + +[`Video`](Video.md).[`snippets`](Video.md#snippets) + +*** + +### style? + +> `optional` **style**: `"VIDEO_STYLE_TYPE_UNKNOWN"` \| `"VIDEO_STYLE_TYPE_NORMAL"` \| `"VIDEO_STYLE_TYPE_POST"` \| `"VIDEO_STYLE_TYPE_SUB"` \| `"VIDEO_STYLE_TYPE_LIVE_POST"` \| `"VIDEO_STYLE_TYPE_FULL_BLEED_ISOLATED"` \| `"VIDEO_STYLE_TYPE_WITH_EXPANDED_METADATA"` + +Defined in: [src/parser/classes/Video.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L41) + +#### Inherited from + +[`Video`](Video.md).[`style`](Video.md#style) + +*** + +### thumbnail\_overlays + +> **thumbnail\_overlays**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> + +Defined in: [src/parser/classes/Video.ts:24](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L24) + +#### Inherited from + +[`Video`](Video.md).[`thumbnail_overlays`](Video.md#thumbnail_overlays) + +*** + +### thumbnails + +> **thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/Video.ts:23](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L23) + +#### Inherited from + +[`Video`](Video.md).[`thumbnails`](Video.md#thumbnails) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L17) + +#### Inherited from + +[`Video`](Video.md).[`title`](Video.md#title) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`Video`](Video.md).[`type`](Video.md#type) + +*** + +### untranslated\_title? + +> `optional` **untranslated\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L18) + +#### Inherited from + +[`Video`](Video.md).[`untranslated_title`](Video.md#untranslated_title) + +*** + +### upcoming? + +> `optional` **upcoming**: `Date` + +Defined in: [src/parser/classes/Video.ts:32](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L32) + +#### Inherited from + +[`Video`](Video.md).[`upcoming`](Video.md#upcoming) + +*** + +### video\_id + +> **video\_id**: `string` + +Defined in: [src/parser/classes/Video.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L16) + +#### Inherited from + +[`Video`](Video.md).[`video_id`](Video.md#video_id) + +*** + +### view\_count? + +> `optional` **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/Video.ts:30](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L30) + +#### Inherited from + +[`Video`](Video.md).[`view_count`](Video.md#view_count) + +*** + +### type + +> `static` **type**: `string` = `'VideoCard'` + +Defined in: [src/parser/classes/VideoCard.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoCard.ts#L7) + +#### Overrides + +[`Video`](Video.md).[`type`](Video.md#type-1) + +## Accessors + +### best\_thumbnail + +#### Get Signature + +> **get** **best\_thumbnail**(): [`Thumbnail`](../../Misc/classes/Thumbnail.md) \| `undefined` + +Defined in: [src/parser/classes/Video.ts:148](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L148) + +##### Returns + +[`Thumbnail`](../../Misc/classes/Thumbnail.md) \| `undefined` + +#### Inherited from + +[`Video`](Video.md).[`best_thumbnail`](Video.md#best_thumbnail) + +*** + +### description + +#### Get Signature + +> **get** **description**(): `string` + +Defined in: [src/parser/classes/Video.ts:119](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L119) + +##### Returns + +`string` + +#### Inherited from + +[`Video`](Video.md).[`description`](Video.md#description) + +*** + +### duration + +#### Get Signature + +> **get** **duration**(): `object` + +Defined in: [src/parser/classes/Video.ts:152](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L152) + +##### Returns + +`object` + +###### seconds + +> **seconds**: `number` + +###### text + +> **text**: `string` \| `undefined` = `length_text` + +#### Inherited from + +[`Video`](Video.md).[`duration`](Video.md#duration) + +*** + +### has\_captions + +#### Get Signature + +> **get** **has\_captions**(): `boolean` + +Defined in: [src/parser/classes/Video.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L144) + +##### Returns + +`boolean` + +#### Inherited from + +[`Video`](Video.md).[`has_captions`](Video.md#has_captions) + +*** + +### id + +#### Get Signature + +> **get** **id**(): `string` + +Defined in: [src/parser/classes/Video.ts:115](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L115) + +##### Deprecated + +Use [`video_id`](Video.md#video_id) instead. + +##### Returns + +`string` + +#### Inherited from + +[`Video`](Video.md).[`id`](Video.md#id) + +*** + +### is\_4k + +#### Get Signature + +> **get** **is\_4k**(): `boolean` + +Defined in: [src/parser/classes/Video.ts:140](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L140) + +##### Returns + +`boolean` + +#### Inherited from + +[`Video`](Video.md).[`is_4k`](Video.md#is_4k) + +*** + +### is\_live + +#### Get Signature + +> **get** **is\_live**(): `boolean` + +Defined in: [src/parser/classes/Video.ts:125](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L125) + +##### Returns + +`boolean` + +#### Inherited from + +[`Video`](Video.md).[`is_live`](Video.md#is_live) + +*** + +### is\_premiere + +#### Get Signature + +> **get** **is\_premiere**(): `boolean` + +Defined in: [src/parser/classes/Video.ts:136](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L136) + +##### Returns + +`boolean` + +#### Inherited from + +[`Video`](Video.md).[`is_premiere`](Video.md#is_premiere) + +*** + +### is\_upcoming + +#### Get Signature + +> **get** **is\_upcoming**(): `boolean` \| `undefined` + +Defined in: [src/parser/classes/Video.ts:132](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/Video.ts#L132) + +##### Returns + +`boolean` \| `undefined` + +#### Inherited from + +[`Video`](Video.md).[`is_upcoming`](Video.md#is_upcoming) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`Video`](Video.md).[`as`](Video.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoCard & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoCard & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`Video`](Video.md).[`hasKey`](Video.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`Video`](Video.md).[`is`](Video.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`Video`](Video.md).[`key`](Video.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/VideoDescriptionCourseSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionCourseSection.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/VideoDescriptionCourseSection.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionCourseSection.md index 981a4af4..348fd4fa 100644 --- a/docs/api/namespaces/YTNodes/classes/VideoDescriptionCourseSection.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionCourseSection.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / VideoDescriptionCourseSection +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoDescriptionCourseSection # Class: VideoDescriptionCourseSection +Defined in: [src/parser/classes/VideoDescriptionCourseSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionCourseSection.ts#L8) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new VideoDescriptionCourseSection() +### Constructor -> **new VideoDescriptionCourseSection**(`data`): [`VideoDescriptionCourseSection`](VideoDescriptionCourseSection.md) +> **new VideoDescriptionCourseSection**(`data`): `VideoDescriptionCourseSection` + +Defined in: [src/parser/classes/VideoDescriptionCourseSection.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionCourseSection.ts#L14) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`VideoDescriptionCourseSection`](VideoDescriptionCourseSection.md) +`VideoDescriptionCourseSection` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/VideoDescriptionCourseSection.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoDescriptionCourseSection.ts#L14) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **media\_lockups**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`StructuredDescriptionPlaylistLockup`](StructuredDescriptionPlaylistLockup.md)\> -#### Defined in - -[src/parser/classes/VideoDescriptionCourseSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoDescriptionCourseSection.ts#L12) +Defined in: [src/parser/classes/VideoDescriptionCourseSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionCourseSection.ts#L12) *** @@ -44,9 +44,7 @@ > **section\_title**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/VideoDescriptionCourseSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoDescriptionCourseSection.ts#L11) +Defined in: [src/parser/classes/VideoDescriptionCourseSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionCourseSection.ts#L11) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'VideoDescriptionCourseSection'` +Defined in: [src/parser/classes/VideoDescriptionCourseSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionCourseSection.ts#L9) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/VideoDescriptionCourseSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoDescriptionCourseSection.ts#L9) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is VideoDescriptionCourseSection & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionHeader.md new file mode 100644 index 00000000..220b279b --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionHeader.md @@ -0,0 +1,271 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoDescriptionHeader + +# Class: VideoDescriptionHeader + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L10) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoDescriptionHeader**(`data`): `VideoDescriptionHeader` + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoDescriptionHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### channel + +> **channel**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L13) + +*** + +### channel\_navigation\_endpoint? + +> `optional` **channel\_navigation\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L14) + +*** + +### channel\_thumbnail + +> **channel\_thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L15) + +*** + +### factoids + +> **factoids**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Factoid`](Factoid.md) \| [`UploadTimeFactoid`](UploadTimeFactoid.md) \| [`ViewCountFactoid`](ViewCountFactoid.md) \| [`HypePointsFactoid`](HypePointsFactoid.md)\> + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L16) + +*** + +### publish\_date + +> **publish\_date**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L17) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L18) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### views + +> **views**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L19) + +*** + +### type + +> `static` **type**: `string` = `'VideoDescriptionHeader'` + +Defined in: [src/parser/classes/VideoDescriptionHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionHeader.ts#L11) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoDescriptionHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoDescriptionHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionInfocardsSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionInfocardsSection.md new file mode 100644 index 00000000..20d9d91a --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionInfocardsSection.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoDescriptionInfocardsSection + +# Class: VideoDescriptionInfocardsSection + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoDescriptionInfocardsSection**(`data`): `VideoDescriptionInfocardsSection` + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L19) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoDescriptionInfocardsSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### channel\_avatar + +> **channel\_avatar**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L16) + +*** + +### channel\_endpoint + +> **channel\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L17) + +*** + +### creator\_about\_button + +> **creator\_about\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L14) + +*** + +### creator\_videos\_button + +> **creator\_videos\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L13) + +*** + +### section\_subtitle + +> **section\_subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L15) + +*** + +### section\_title + +> **section\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'VideoDescriptionInfocardsSection'` + +Defined in: [src/parser/classes/VideoDescriptionInfocardsSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionInfocardsSection.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoDescriptionInfocardsSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoDescriptionInfocardsSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionMusicSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionMusicSection.md new file mode 100644 index 00000000..c2b4a51f --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionMusicSection.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoDescriptionMusicSection + +# Class: VideoDescriptionMusicSection + +Defined in: [src/parser/classes/VideoDescriptionMusicSection.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionMusicSection.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoDescriptionMusicSection**(`data`): `VideoDescriptionMusicSection` + +Defined in: [src/parser/classes/VideoDescriptionMusicSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionMusicSection.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoDescriptionMusicSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### carousel\_lockups + +> **carousel\_lockups**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CarouselLockup`](CarouselLockup.md)\> + +Defined in: [src/parser/classes/VideoDescriptionMusicSection.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionMusicSection.ts#L9) + +*** + +### section\_title + +> **section\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionMusicSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionMusicSection.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'VideoDescriptionMusicSection'` + +Defined in: [src/parser/classes/VideoDescriptionMusicSection.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionMusicSection.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoDescriptionMusicSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoDescriptionMusicSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionTranscriptSection.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionTranscriptSection.md new file mode 100644 index 00000000..82186f12 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoDescriptionTranscriptSection.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoDescriptionTranscriptSection + +# Class: VideoDescriptionTranscriptSection + +Defined in: [src/parser/classes/VideoDescriptionTranscriptSection.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionTranscriptSection.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoDescriptionTranscriptSection**(`data`): `VideoDescriptionTranscriptSection` + +Defined in: [src/parser/classes/VideoDescriptionTranscriptSection.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionTranscriptSection.ts#L14) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoDescriptionTranscriptSection` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### primary\_button + +> **primary\_button**: [`Button`](Button.md) \| `null` + +Defined in: [src/parser/classes/VideoDescriptionTranscriptSection.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionTranscriptSection.ts#L12) + +*** + +### section\_title + +> **section\_title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionTranscriptSection.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionTranscriptSection.ts#L10) + +*** + +### sub\_header\_text + +> **sub\_header\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoDescriptionTranscriptSection.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionTranscriptSection.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'VideoDescriptionTranscriptSection'` + +Defined in: [src/parser/classes/VideoDescriptionTranscriptSection.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoDescriptionTranscriptSection.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoDescriptionTranscriptSection & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoDescriptionTranscriptSection & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoInfoCardContent.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoInfoCardContent.md new file mode 100644 index 00000000..814e4344 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoInfoCardContent.md @@ -0,0 +1,263 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoInfoCardContent + +# Class: VideoInfoCardContent + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoInfoCardContent**(`data`): `VideoInfoCardContent` + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoInfoCardContent` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### channel\_name + +> **channel\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L11) + +*** + +### duration + +> **duration**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L14) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L15) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_thumbnails + +> **video\_thumbnails**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L13) + +*** + +### view\_count + +> **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L12) + +*** + +### type + +> `static` **type**: `string` = `'VideoInfoCardContent'` + +Defined in: [src/parser/classes/VideoInfoCardContent.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoInfoCardContent.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoInfoCardContent & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoInfoCardContent & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoMetadataCarouselView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoMetadataCarouselView.md new file mode 100644 index 00000000..66d686e1 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoMetadataCarouselView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoMetadataCarouselView + +# Class: VideoMetadataCarouselView + +Defined in: [src/parser/classes/VideoMetadataCarouselView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoMetadataCarouselView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoMetadataCarouselView**(`data`): `VideoMetadataCarouselView` + +Defined in: [src/parser/classes/VideoMetadataCarouselView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoMetadataCarouselView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoMetadataCarouselView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### carousel\_items + +> **carousel\_items**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CarouselItemView`](CarouselItemView.md)\> \| `null` + +Defined in: [src/parser/classes/VideoMetadataCarouselView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoMetadataCarouselView.ts#L10) + +*** + +### carousel\_titles + +> **carousel\_titles**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`CarouselTitleView`](CarouselTitleView.md)\> \| `null` + +Defined in: [src/parser/classes/VideoMetadataCarouselView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoMetadataCarouselView.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'VideoMetadataCarouselView'` + +Defined in: [src/parser/classes/VideoMetadataCarouselView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoMetadataCarouselView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoMetadataCarouselView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoMetadataCarouselView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/VideoOwner.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoOwner.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/VideoOwner.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/VideoOwner.md index bed6bbcb..36ccb8b6 100644 --- a/docs/api/namespaces/YTNodes/classes/VideoOwner.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoOwner.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / VideoOwner +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoOwner # Class: VideoOwner +Defined in: [src/parser/classes/VideoOwner.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoOwner.ts#L7) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new VideoOwner() +### Constructor -> **new VideoOwner**(`data`): [`VideoOwner`](VideoOwner.md) +> **new VideoOwner**(`data`): `VideoOwner` + +Defined in: [src/parser/classes/VideoOwner.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoOwner.ts#L14) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`VideoOwner`](VideoOwner.md) +`VideoOwner` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/VideoOwner.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoOwner.ts#L14) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **author**: [`Author`](../../Misc/classes/Author.md) -#### Defined in - -[src/parser/classes/VideoOwner.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoOwner.ts#L12) +Defined in: [src/parser/classes/VideoOwner.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoOwner.ts#L12) *** @@ -44,9 +44,7 @@ > **subscriber\_count**: [`Text`](../../Misc/classes/Text.md) -#### Defined in - -[src/parser/classes/VideoOwner.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoOwner.ts#L11) +Defined in: [src/parser/classes/VideoOwner.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoOwner.ts#L11) *** @@ -54,9 +52,7 @@ > `optional` **subscription\_button**: [`SubscriptionButton`](../../Misc/classes/SubscriptionButton.md) -#### Defined in - -[src/parser/classes/VideoOwner.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoOwner.ts#L10) +Defined in: [src/parser/classes/VideoOwner.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoOwner.ts#L10) *** @@ -64,45 +60,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'VideoOwner'` +Defined in: [src/parser/classes/VideoOwner.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoOwner.ts#L8) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/VideoOwner.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/VideoOwner.ts#L8) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -120,27 +120,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is VideoOwner & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -154,27 +158,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -188,27 +196,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -225,7 +237,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoPrimaryInfo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoPrimaryInfo.md new file mode 100644 index 00000000..5e056b5d --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoPrimaryInfo.md @@ -0,0 +1,279 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoPrimaryInfo + +# Class: VideoPrimaryInfo + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoPrimaryInfo**(`data`): `VideoPrimaryInfo` + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:21](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L21) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoPrimaryInfo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### badges + +> **badges**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`MetadataBadge`](MetadataBadge.md)\> + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L16) + +*** + +### menu + +> **menu**: [`Menu`](Menu.md) \| `null` + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L19) + +*** + +### published + +> **published**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L17) + +*** + +### relative\_date + +> **relative\_date**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L18) + +*** + +### station\_name? + +> `optional` **station\_name**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L14) + +*** + +### super\_title\_link? + +> `optional` **super\_title\_link**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L13) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L12) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_count + +> **view\_count**: [`VideoViewCount`](VideoViewCount.md) \| `null` + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L15) + +*** + +### type + +> `static` **type**: `string` = `'VideoPrimaryInfo'` + +Defined in: [src/parser/classes/VideoPrimaryInfo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoPrimaryInfo.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoPrimaryInfo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoPrimaryInfo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoSecondaryInfo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoSecondaryInfo.md new file mode 100644 index 00000000..a13553ff --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoSecondaryInfo.md @@ -0,0 +1,287 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoSecondaryInfo + +# Class: VideoSecondaryInfo + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L9) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoSecondaryInfo**(`data`): `VideoSecondaryInfo` + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:22](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L22) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoSecondaryInfo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### default\_expanded + +> **default\_expanded**: `string` + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L19) + +*** + +### description + +> **description**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L13) + +*** + +### description\_collapsed\_lines + +> **description\_collapsed\_lines**: `string` + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L20) + +*** + +### description\_placeholder? + +> `optional` **description\_placeholder**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L14) + +*** + +### metadata + +> **metadata**: [`MetadataRowContainer`](MetadataRowContainer.md) \| `null` + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L16) + +*** + +### owner + +> **owner**: [`VideoOwner`](VideoOwner.md) \| `null` + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L12) + +*** + +### show\_less\_text + +> **show\_less\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:18](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L18) + +*** + +### show\_more\_text + +> **show\_more\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L17) + +*** + +### subscribe\_button + +> **subscribe\_button**: [`Button`](Button.md) \| [`SubscribeButton`](SubscribeButton.md) \| `null` + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L15) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'VideoSecondaryInfo'` + +Defined in: [src/parser/classes/VideoSecondaryInfo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoSecondaryInfo.ts#L10) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoSecondaryInfo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoSecondaryInfo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoViewCount.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoViewCount.md new file mode 100644 index 00000000..1df7d430 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VideoViewCount.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VideoViewCount + +# Class: VideoViewCount + +Defined in: [src/parser/classes/VideoViewCount.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoViewCount.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VideoViewCount**(`data`): `VideoViewCount` + +Defined in: [src/parser/classes/VideoViewCount.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoViewCount.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VideoViewCount` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### extra\_short\_view\_count + +> **extra\_short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoViewCount.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoViewCount.ts#L10) + +*** + +### original\_view\_count + +> **original\_view\_count**: `string` + +Defined in: [src/parser/classes/VideoViewCount.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoViewCount.ts#L8) + +*** + +### short\_view\_count + +> **short\_view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoViewCount.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoViewCount.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_count + +> **view\_count**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/VideoViewCount.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoViewCount.ts#L11) + +*** + +### type + +> `static` **type**: `string` = `'VideoViewCount'` + +Defined in: [src/parser/classes/VideoViewCount.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/VideoViewCount.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VideoViewCount & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VideoViewCount & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/ViewCountFactoid.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/ViewCountFactoid.md new file mode 100644 index 00000000..ceff1044 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/ViewCountFactoid.md @@ -0,0 +1,239 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / ViewCountFactoid + +# Class: ViewCountFactoid + +Defined in: [src/parser/classes/ViewCountFactoid.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ViewCountFactoid.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new ViewCountFactoid**(`data`): `ViewCountFactoid` + +Defined in: [src/parser/classes/ViewCountFactoid.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ViewCountFactoid.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`ViewCountFactoid` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### factoid + +> **factoid**: [`Factoid`](Factoid.md) \| `null` + +Defined in: [src/parser/classes/ViewCountFactoid.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ViewCountFactoid.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### view\_count\_entity\_key + +> **view\_count\_entity\_key**: `string` + +Defined in: [src/parser/classes/ViewCountFactoid.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ViewCountFactoid.ts#L9) + +*** + +### view\_count\_type + +> **view\_count\_type**: `string` + +Defined in: [src/parser/classes/ViewCountFactoid.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ViewCountFactoid.ts#L11) + +*** + +### type + +> `static` **type**: `string` = `'ViewCountFactoid'` + +Defined in: [src/parser/classes/ViewCountFactoid.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/ViewCountFactoid.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is ViewCountFactoid & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is ViewCountFactoid & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/VoiceReplyContainerView.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/VoiceReplyContainerView.md new file mode 100644 index 00000000..caf546b7 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/VoiceReplyContainerView.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / VoiceReplyContainerView + +# Class: VoiceReplyContainerView + +Defined in: [src/parser/classes/comments/VoiceReplyContainerView.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/VoiceReplyContainerView.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new VoiceReplyContainerView**(`data`): `VoiceReplyContainerView` + +Defined in: [src/parser/classes/comments/VoiceReplyContainerView.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/VoiceReplyContainerView.ts#L12) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`VoiceReplyContainerView` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### transcript\_text + +> **transcript\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/VoiceReplyContainerView.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/VoiceReplyContainerView.ts#L10) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### voice\_reply\_unavailable\_text + +> **voice\_reply\_unavailable\_text**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/comments/VoiceReplyContainerView.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/VoiceReplyContainerView.ts#L9) + +*** + +### type + +> `static` **type**: `string` = `'VoiceReplyContainerView'` + +Defined in: [src/parser/classes/comments/VoiceReplyContainerView.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/comments/VoiceReplyContainerView.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is VoiceReplyContainerView & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is VoiceReplyContainerView & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardCompactVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardCompactVideo.md new file mode 100644 index 00000000..5dc499e6 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardCompactVideo.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / WatchCardCompactVideo + +# Class: WatchCardCompactVideo + +Defined in: [src/parser/classes/WatchCardCompactVideo.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardCompactVideo.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new WatchCardCompactVideo**(`data`): `WatchCardCompactVideo` + +Defined in: [src/parser/classes/WatchCardCompactVideo.ts:17](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardCompactVideo.ts#L17) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`WatchCardCompactVideo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### duration + +> **duration**: `object` + +Defined in: [src/parser/classes/WatchCardCompactVideo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardCompactVideo.ts#L11) + +#### seconds + +> **seconds**: `number` + +#### text + +> **text**: `string` + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/WatchCardCompactVideo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardCompactVideo.ts#L15) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/WatchCardCompactVideo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardCompactVideo.ts#L10) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/WatchCardCompactVideo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardCompactVideo.ts#L9) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'WatchCardCompactVideo'` + +Defined in: [src/parser/classes/WatchCardCompactVideo.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardCompactVideo.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is WatchCardCompactVideo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is WatchCardCompactVideo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardHeroVideo.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardHeroVideo.md new file mode 100644 index 00000000..bcf439b1 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardHeroVideo.md @@ -0,0 +1,247 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / WatchCardHeroVideo + +# Class: WatchCardHeroVideo + +Defined in: [src/parser/classes/WatchCardHeroVideo.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardHeroVideo.ts#L5) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new WatchCardHeroVideo**(`data`): `WatchCardHeroVideo` + +Defined in: [src/parser/classes/WatchCardHeroVideo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardHeroVideo.ts#L13) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`WatchCardHeroVideo` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### call\_to\_action\_button + +> **call\_to\_action\_button**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/WatchCardHeroVideo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardHeroVideo.ts#L9) + +*** + +### endpoint + +> **endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/WatchCardHeroVideo.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardHeroVideo.ts#L8) + +*** + +### hero\_image + +> **hero\_image**: [`YTNode`](../../Helpers/classes/YTNode.md) + +Defined in: [src/parser/classes/WatchCardHeroVideo.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardHeroVideo.ts#L10) + +*** + +### label + +> **label**: `string` + +Defined in: [src/parser/classes/WatchCardHeroVideo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardHeroVideo.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'WatchCardHeroVideo'` + +Defined in: [src/parser/classes/WatchCardHeroVideo.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardHeroVideo.ts#L6) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is WatchCardHeroVideo & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is WatchCardHeroVideo & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardRichHeader.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardRichHeader.md new file mode 100644 index 00000000..28723738 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardRichHeader.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / WatchCardRichHeader + +# Class: WatchCardRichHeader + +Defined in: [src/parser/classes/WatchCardRichHeader.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardRichHeader.ts#L7) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new WatchCardRichHeader**(`data`): `WatchCardRichHeader` + +Defined in: [src/parser/classes/WatchCardRichHeader.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardRichHeader.ts#L16) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`WatchCardRichHeader` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### author + +> **author**: [`Author`](../../Misc/classes/Author.md) + +Defined in: [src/parser/classes/WatchCardRichHeader.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardRichHeader.ts#L13) + +*** + +### style + +> **style**: `string` + +Defined in: [src/parser/classes/WatchCardRichHeader.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardRichHeader.ts#L14) + +*** + +### subtitle + +> **subtitle**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/WatchCardRichHeader.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardRichHeader.ts#L12) + +*** + +### title + +> **title**: [`Text`](../../Misc/classes/Text.md) + +Defined in: [src/parser/classes/WatchCardRichHeader.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardRichHeader.ts#L10) + +*** + +### title\_endpoint + +> **title\_endpoint**: [`NavigationEndpoint`](NavigationEndpoint.md) + +Defined in: [src/parser/classes/WatchCardRichHeader.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardRichHeader.ts#L11) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'WatchCardRichHeader'` + +Defined in: [src/parser/classes/WatchCardRichHeader.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardRichHeader.ts#L8) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is WatchCardRichHeader & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is WatchCardRichHeader & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/WatchCardSectionSequence.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardSectionSequence.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/WatchCardSectionSequence.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardSectionSequence.md index bb531085..f031e22b 100644 --- a/docs/api/namespaces/YTNodes/classes/WatchCardSectionSequence.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchCardSectionSequence.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / WatchCardSectionSequence +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / WatchCardSectionSequence # Class: WatchCardSectionSequence +Defined in: [src/parser/classes/WatchCardSectionSequence.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardSectionSequence.ts#L5) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new WatchCardSectionSequence() +### Constructor -> **new WatchCardSectionSequence**(`data`): [`WatchCardSectionSequence`](WatchCardSectionSequence.md) +> **new WatchCardSectionSequence**(`data`): `WatchCardSectionSequence` + +Defined in: [src/parser/classes/WatchCardSectionSequence.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardSectionSequence.ts#L10) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`WatchCardSectionSequence`](WatchCardSectionSequence.md) +`WatchCardSectionSequence` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/WatchCardSectionSequence.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchCardSectionSequence.ts#L10) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **lists**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\> -#### Defined in - -[src/parser/classes/WatchCardSectionSequence.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchCardSectionSequence.ts#L8) +Defined in: [src/parser/classes/WatchCardSectionSequence.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardSectionSequence.ts#L8) *** @@ -44,45 +44,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'WatchCardSectionSequence'` +Defined in: [src/parser/classes/WatchCardSectionSequence.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchCardSectionSequence.ts#L6) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/WatchCardSectionSequence.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchCardSectionSequence.ts#L6) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -100,27 +104,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is WatchCardSectionSequence & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -134,27 +142,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -168,27 +180,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -205,7 +221,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchEndpoint.md new file mode 100644 index 00000000..a463c792 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchEndpoint.md @@ -0,0 +1,255 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / WatchEndpoint + +# Class: WatchEndpoint + +Defined in: [src/parser/classes/endpoints/WatchEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Extended by + +- [`PrefetchWatchCommand`](PrefetchWatchCommand.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`WatchRequest`](../../../../type-aliases/WatchRequest.md)\> + +## Constructors + +### Constructor + +> **new WatchEndpoint**(`data`): `WatchEndpoint` + +Defined in: [src/parser/classes/endpoints/WatchEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`WatchEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'WatchEndpoint'` + +Defined in: [src/parser/classes/endpoints/WatchEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`WatchRequest`](../../../../type-aliases/WatchRequest.md) + +Defined in: [src/parser/classes/endpoints/WatchEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchEndpoint.ts#L20) + +#### Returns + +[`WatchRequest`](../../../../type-aliases/WatchRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/WatchEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is WatchEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is WatchEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/WatchNextEndScreen.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextEndScreen.md similarity index 50% rename from docs/api/namespaces/YTNodes/classes/WatchNextEndScreen.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextEndScreen.md index 79fa7a4e..4834d8b0 100644 --- a/docs/api/namespaces/YTNodes/classes/WatchNextEndScreen.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextEndScreen.md @@ -1,32 +1,34 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / WatchNextEndScreen +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / WatchNextEndScreen # Class: WatchNextEndScreen +Defined in: [src/parser/classes/WatchNextEndScreen.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchNextEndScreen.ts#L7) + ## Extends - [`YTNode`](../../Helpers/classes/YTNode.md) ## Constructors -### new WatchNextEndScreen() +### Constructor -> **new WatchNextEndScreen**(`data`): [`WatchNextEndScreen`](WatchNextEndScreen.md) +> **new WatchNextEndScreen**(`data`): `WatchNextEndScreen` + +Defined in: [src/parser/classes/WatchNextEndScreen.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchNextEndScreen.ts#L13) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`WatchNextEndScreen`](WatchNextEndScreen.md) +`WatchNextEndScreen` #### Overrides -[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructors) - -#### Defined in - -[src/parser/classes/WatchNextEndScreen.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchNextEndScreen.ts#L13) +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) ## Properties @@ -34,9 +36,7 @@ > **results**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`EndScreenPlaylist`](EndScreenPlaylist.md) \| [`EndScreenVideo`](EndScreenVideo.md)\> -#### Defined in - -[src/parser/classes/WatchNextEndScreen.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchNextEndScreen.ts#L10) +Defined in: [src/parser/classes/WatchNextEndScreen.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchNextEndScreen.ts#L10) *** @@ -44,9 +44,7 @@ > **title**: `string` -#### Defined in - -[src/parser/classes/WatchNextEndScreen.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchNextEndScreen.ts#L11) +Defined in: [src/parser/classes/WatchNextEndScreen.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchNextEndScreen.ts#L11) *** @@ -54,45 +52,49 @@ > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../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) - *** ### type > `static` **type**: `string` = `'WatchNextEndScreen'` +Defined in: [src/parser/classes/WatchNextEndScreen.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchNextEndScreen.ts#L8) + #### Overrides [`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) -#### Defined in - -[src/parser/classes/WatchNextEndScreen.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchNextEndScreen.ts#L8) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -110,27 +112,31 @@ If the node is not of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../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) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is WatchNextEndScreen & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -144,27 +150,31 @@ Whether the node has the key [`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../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) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -178,27 +188,31 @@ whether the node is of the given type [`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../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) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -215,7 +229,3 @@ If the node does not have the key #### Inherited from [`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../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) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextEndpoint.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextEndpoint.md new file mode 100644 index 00000000..e6dfb968 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextEndpoint.md @@ -0,0 +1,251 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / WatchNextEndpoint + +# Class: WatchNextEndpoint + +Defined in: [src/parser/classes/endpoints/WatchNextEndpoint.ts:6](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchNextEndpoint.ts#L6) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Implements + +- [`IEndpoint`](../../../../interfaces/IEndpoint.md)\<[`WatchNextRequest`](../../../../type-aliases/WatchNextRequest.md)\> + +## Constructors + +### Constructor + +> **new WatchNextEndpoint**(`data`): `WatchNextEndpoint` + +Defined in: [src/parser/classes/endpoints/WatchNextEndpoint.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchNextEndpoint.ts#L11) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`WatchNextEndpoint` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### type + +> `static` **type**: `string` = `'WatchNextEndpoint'` + +Defined in: [src/parser/classes/endpoints/WatchNextEndpoint.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchNextEndpoint.ts#L7) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### buildRequest() + +> **buildRequest**(): [`WatchNextRequest`](../../../../type-aliases/WatchNextRequest.md) + +Defined in: [src/parser/classes/endpoints/WatchNextEndpoint.ts:20](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchNextEndpoint.ts#L20) + +#### Returns + +[`WatchNextRequest`](../../../../type-aliases/WatchNextRequest.md) + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`buildRequest`](../../../../interfaces/IEndpoint.md#buildrequest) + +*** + +### getApiPath() + +> **getApiPath**(): `string` + +Defined in: [src/parser/classes/endpoints/WatchNextEndpoint.ts:16](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/endpoints/WatchNextEndpoint.ts#L16) + +#### Returns + +`string` + +#### Implementation of + +[`IEndpoint`](../../../../interfaces/IEndpoint.md).[`getApiPath`](../../../../interfaces/IEndpoint.md#getapipath) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is WatchNextEndpoint & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is WatchNextEndpoint & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTNodes/classes/WatchNextTabbedResults.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextTabbedResults.md similarity index 51% rename from docs/api/namespaces/YTNodes/classes/WatchNextTabbedResults.md rename to docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextTabbedResults.md index 2f7e2755..6da5af9e 100644 --- a/docs/api/namespaces/YTNodes/classes/WatchNextTabbedResults.md +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/WatchNextTabbedResults.md @@ -1,106 +1,108 @@ -[youtubei.js](../../../README.md) / [YTNodes](../README.md) / WatchNextTabbedResults +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / WatchNextTabbedResults # Class: WatchNextTabbedResults +Defined in: [src/parser/classes/WatchNextTabbedResults.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchNextTabbedResults.ts#L4) + ## Extends - [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md) ## Constructors -### new WatchNextTabbedResults() +### Constructor -> **new WatchNextTabbedResults**(`data`): [`WatchNextTabbedResults`](WatchNextTabbedResults.md) +> **new WatchNextTabbedResults**(`data`): `WatchNextTabbedResults` + +Defined in: [src/parser/classes/WatchNextTabbedResults.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchNextTabbedResults.ts#L7) #### Parameters -• **data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md) +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) #### Returns -[`WatchNextTabbedResults`](WatchNextTabbedResults.md) +`WatchNextTabbedResults` #### Overrides -[`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`constructor`](TwoColumnBrowseResults.md#constructors) - -#### Defined in - -[src/parser/classes/WatchNextTabbedResults.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchNextTabbedResults.ts#L7) +[`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`constructor`](TwoColumnBrowseResults.md#constructor) ## Properties ### secondary\_contents -> **secondary\_contents**: `null` \| [`SectionList`](SectionList.md) \| [`BrowseFeedActions`](BrowseFeedActions.md) \| [`ProfileColumn`](ProfileColumn.md) +> **secondary\_contents**: [`SectionList`](SectionList.md) \| [`BrowseFeedActions`](BrowseFeedActions.md) \| [`ProfileColumn`](ProfileColumn.md) \| `null` + +Defined in: [src/parser/classes/TwoColumnBrowseResults.ts:14](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnBrowseResults.ts#L14) #### Inherited from [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`secondary_contents`](TwoColumnBrowseResults.md#secondary_contents) -#### Defined in - -[src/parser/classes/TwoColumnBrowseResults.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnBrowseResults.ts#L14) - *** ### tabs > **tabs**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Tab`](Tab.md) \| [`ExpandableTab`](ExpandableTab.md)\> +Defined in: [src/parser/classes/TwoColumnBrowseResults.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/TwoColumnBrowseResults.ts#L13) + #### Inherited from [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`tabs`](TwoColumnBrowseResults.md#tabs) -#### Defined in - -[src/parser/classes/TwoColumnBrowseResults.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/TwoColumnBrowseResults.ts#L13) - *** ### type > `readonly` **type**: `string` +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + #### Inherited from [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`type`](TwoColumnBrowseResults.md#type) -#### Defined in - -[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8) - *** ### type > `static` **type**: `string` = `'WatchNextTabbedResults'` +Defined in: [src/parser/classes/WatchNextTabbedResults.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/WatchNextTabbedResults.ts#L5) + #### Overrides [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`type`](TwoColumnBrowseResults.md#type-1) -#### Defined in - -[src/parser/classes/WatchNextTabbedResults.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/WatchNextTabbedResults.ts#L5) - ## Methods ### as() > **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + Cast to one of the given types. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The types to cast to @@ -118,27 +120,31 @@ If the node is not of the given type [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`as`](TwoColumnBrowseResults.md#as) -#### Defined in - -[src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29) - *** ### hasKey() > **hasKey**\<`T`, `R`\>(`key`): `this is WatchNextTabbedResults & { [k in string]: R }` +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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,27 +158,31 @@ Whether the node has the key [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`hasKey`](TwoColumnBrowseResults.md#haskey) -#### Defined in - -[src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41) - *** ### is() > **is**\<`T`, `K`\>(...`types`): `this is InstanceType` +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + Check if the node is of the given type. #### Type Parameters -• **T** *extends* [`YTNode`](../../Helpers/classes/YTNode.md) +##### T -• **K** *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] #### Parameters -• ...**types**: `K` +##### types + +...`K` The type to check @@ -186,27 +196,31 @@ whether the node is of the given type [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`is`](TwoColumnBrowseResults.md#is) -#### Defined in - -[src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19) - *** ### key() > **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/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 @@ -223,7 +237,3 @@ If the node does not have the key #### Inherited from [`TwoColumnBrowseResults`](TwoColumnBrowseResults.md).[`key`](TwoColumnBrowseResults.md#key) - -#### Defined in - -[src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51) diff --git a/docs/api/youtubei.js/namespaces/YTNodes/classes/YpcTrailer.md b/docs/api/youtubei.js/namespaces/YTNodes/classes/YpcTrailer.md new file mode 100644 index 00000000..b28eb4ce --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTNodes/classes/YpcTrailer.md @@ -0,0 +1,231 @@ +[youtubei.js](../../../../README.md) / [YTNodes](../README.md) / YpcTrailer + +# Class: YpcTrailer + +Defined in: [src/parser/classes/YpcTrailer.ts:4](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/YpcTrailer.ts#L4) + +## Extends + +- [`YTNode`](../../Helpers/classes/YTNode.md) + +## Constructors + +### Constructor + +> **new YpcTrailer**(`data`): `YpcTrailer` + +Defined in: [src/parser/classes/YpcTrailer.ts:10](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/YpcTrailer.ts#L10) + +#### Parameters + +##### data + +[`RawNode`](../../../../type-aliases/RawNode.md) + +#### Returns + +`YpcTrailer` + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`constructor`](../../Helpers/classes/YTNode.md#constructor) + +## Properties + +### player\_response + +> **player\_response**: [`IRawResponse`](../../../../interfaces/IRawResponse.md) + +Defined in: [src/parser/classes/YpcTrailer.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/YpcTrailer.ts#L8) + +*** + +### type + +> `readonly` **type**: `string` + +Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L8) + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type) + +*** + +### video\_message + +> **video\_message**: `string` + +Defined in: [src/parser/classes/YpcTrailer.ts:7](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/YpcTrailer.ts#L7) + +*** + +### type + +> `static` **type**: `string` = `'YpcTrailer'` + +Defined in: [src/parser/classes/YpcTrailer.ts:5](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/classes/YpcTrailer.ts#L5) + +#### Overrides + +[`YTNode`](../../Helpers/classes/YTNode.md).[`type`](../../Helpers/classes/YTNode.md#type-1) + +## Methods + +### as() + +> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\> + +Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L29) + +Cast to one of the given types. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The types to cast to + +#### Returns + +`InstanceType`\<`K`\[`number`\]\> + +The node cast to one of the given types + +#### Throws + +If the node is not of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`as`](../../Helpers/classes/YTNode.md#as) + +*** + +### hasKey() + +> **hasKey**\<`T`, `R`\>(`key`): `this is YpcTrailer & { [k in string]: R }` + +Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L41) + +Check for a key without asserting the type. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +`this is YpcTrailer & { [k in string]: R }` + +Whether the node has the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`hasKey`](../../Helpers/classes/YTNode.md#haskey) + +*** + +### is() + +> **is**\<`T`, `K`\>(...`types`): `this is InstanceType` + +Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L19) + +Check if the node is of the given type. + +#### Type Parameters + +##### T + +`T` *extends* [`YTNode`](../../Helpers/classes/YTNode.md) + +##### K + +`K` *extends* [`YTNodeConstructor`](../../Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[] + +#### Parameters + +##### types + +...`K` + +The type to check + +#### Returns + +`this is InstanceType` + +whether the node is of the given type + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`is`](../../Helpers/classes/YTNode.md#is) + +*** + +### key() + +> **key**\<`T`, `R`\>(`key`): [`Maybe`](../../Helpers/classes/Maybe.md) + +Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/helpers.ts#L51) + +Assert that the node has the given key and return it. + +#### Type Parameters + +##### T + +`T` *extends* `string` + +##### R + +`R` = `any` + +#### Parameters + +##### key + +`T` + +The key to check + +#### Returns + +[`Maybe`](../../Helpers/classes/Maybe.md) + +The value of the key wrapped in a Maybe + +#### Throws + +If the node does not have the key + +#### Inherited from + +[`YTNode`](../../Helpers/classes/YTNode.md).[`key`](../../Helpers/classes/YTNode.md#key) diff --git a/docs/api/namespaces/YTShorts/README.md b/docs/api/youtubei.js/namespaces/YTShorts/README.md similarity index 51% rename from docs/api/namespaces/YTShorts/README.md rename to docs/api/youtubei.js/namespaces/YTShorts/README.md index 57d924cd..ed9ec087 100644 --- a/docs/api/namespaces/YTShorts/README.md +++ b/docs/api/youtubei.js/namespaces/YTShorts/README.md @@ -1,9 +1,7 @@ -[youtubei.js](../../README.md) / YTShorts +[youtubei.js](../../../README.md) / YTShorts # YTShorts -## Index - -### Classes +## Classes - [ShortFormVideoInfo](classes/ShortFormVideoInfo.md) diff --git a/docs/api/youtubei.js/namespaces/YTShorts/classes/ShortFormVideoInfo.md b/docs/api/youtubei.js/namespaces/YTShorts/classes/ShortFormVideoInfo.md new file mode 100644 index 00000000..60c62419 --- /dev/null +++ b/docs/api/youtubei.js/namespaces/YTShorts/classes/ShortFormVideoInfo.md @@ -0,0 +1,591 @@ +[youtubei.js](../../../../README.md) / [YTShorts](../README.md) / ShortFormVideoInfo + +# Class: ShortFormVideoInfo + +Defined in: [src/parser/ytshorts/ShortFormVideoInfo.ts:9](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytshorts/ShortFormVideoInfo.ts#L9) + +## Extends + +- [`MediaInfo`](../../Mixins/classes/MediaInfo.md) + +## Constructors + +### Constructor + +> **new ShortFormVideoInfo**(`data`, `actions`, `cpn`, `reel_watch_sequence_response`): `ShortFormVideoInfo` + +Defined in: [src/parser/ytshorts/ShortFormVideoInfo.ts:15](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytshorts/ShortFormVideoInfo.ts#L15) + +#### Parameters + +##### data + +\[[`ApiResponse`](../../../../interfaces/ApiResponse.md), [`ApiResponse`](../../../../interfaces/ApiResponse.md)?\] + +##### actions + +[`Actions`](../../../../classes/Actions.md) + +##### cpn + +`string` + +##### reel\_watch\_sequence\_response + +[`ApiResponse`](../../../../interfaces/ApiResponse.md) + +#### Returns + +`ShortFormVideoInfo` + +#### Overrides + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`constructor`](../../Mixins/classes/MediaInfo.md#constructor) + +## Properties + +### annotations? + +> `optional` **annotations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlayerAnnotationsExpanded`](../../YTNodes/classes/PlayerAnnotationsExpanded.md)\> + +Defined in: [src/core/mixins/MediaInfo.ts:40](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L40) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`annotations`](../../Mixins/classes/MediaInfo.md#annotations) + +*** + +### basic\_info + +> **basic\_info**: `object` + +Defined in: [src/core/mixins/MediaInfo.ts:39](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L39) + +#### allow\_ratings? + +> `optional` **allow\_ratings**: `boolean` + +#### author? + +> `optional` **author**: `string` + +#### category + +> **category**: `string` \| `null` + +#### channel + +> **channel**: \{ `id`: `string`; `name`: `string`; `url`: `string`; \} \| `null` + +#### channel\_id? + +> `optional` **channel\_id**: `string` + +#### duration? + +> `optional` **duration**: `number` + +#### embed + +> **embed**: \{ `flash_secure_url`: `string`; `flash_url`: `string`; `height`: `any`; `iframe_url`: `string`; `width`: `any`; \} \| `null` \| `undefined` + +#### end\_timestamp + +> **end\_timestamp**: `Date` \| `null` + +#### has\_ypc\_metadata + +> **has\_ypc\_metadata**: `boolean` \| `null` + +#### id? + +> `optional` **id**: `string` + +#### is\_crawlable? + +> `optional` **is\_crawlable**: `boolean` + +#### is\_disliked + +> **is\_disliked**: `boolean` \| `undefined` + +#### is\_family\_safe + +> **is\_family\_safe**: `boolean` \| `undefined` = `info.microformat.is_family_safe` + +#### is\_liked + +> **is\_liked**: `boolean` \| `undefined` + +#### is\_live? + +> `optional` **is\_live**: `boolean` + +#### is\_live\_content? + +> `optional` **is\_live\_content**: `boolean` + +#### is\_live\_dvr\_enabled? + +> `optional` **is\_live\_dvr\_enabled**: `boolean` + +#### is\_low\_latency\_live\_stream? + +> `optional` **is\_low\_latency\_live\_stream**: `boolean` + +#### is\_owner\_viewing? + +> `optional` **is\_owner\_viewing**: `boolean` + +#### is\_post\_live\_dvr? + +> `optional` **is\_post\_live\_dvr**: `boolean` + +#### is\_private? + +> `optional` **is\_private**: `boolean` + +#### is\_unlisted + +> **is\_unlisted**: `boolean` \| `undefined` = `info.microformat.is_unlisted` + +#### is\_upcoming? + +> `optional` **is\_upcoming**: `boolean` + +#### keywords? + +> `optional` **keywords**: `string`[] + +#### like\_count + +> **like\_count**: `number` \| `undefined` + +#### live\_chunk\_readahead? + +> `optional` **live\_chunk\_readahead**: `number` + +#### short\_description? + +> `optional` **short\_description**: `string` + +#### start\_timestamp + +> **start\_timestamp**: `Date` \| `null` + +#### tags + +> **tags**: `string`[] \| `null` + +#### thumbnail? + +> `optional` **thumbnail**: [`Thumbnail`](../../Misc/classes/Thumbnail.md)[] + +#### title? + +> `optional` **title**: `string` + +#### url\_canonical + +> **url\_canonical**: `string` \| `null` + +#### view\_count + +> **view\_count**: `number` \| `undefined` + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`basic_info`](../../Mixins/classes/MediaInfo.md#basic_info) + +*** + +### captions? + +> `optional` **captions**: [`PlayerCaptionsTracklist`](../../YTNodes/classes/PlayerCaptionsTracklist.md) + +Defined in: [src/core/mixins/MediaInfo.ts:43](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L43) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`captions`](../../Mixins/classes/MediaInfo.md#captions) + +*** + +### cards? + +> `optional` **cards**: [`CardCollection`](../../YTNodes/classes/CardCollection.md) + +Defined in: [src/core/mixins/MediaInfo.ts:44](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L44) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`cards`](../../Mixins/classes/MediaInfo.md#cards) + +*** + +### current\_video\_endpoint? + +> `optional` **current\_video\_endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) + +Defined in: [src/parser/ytshorts/ShortFormVideoInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytshorts/ShortFormVideoInfo.ts#L12) + +*** + +### endscreen? + +> `optional` **endscreen**: [`Endscreen`](../../YTNodes/classes/Endscreen.md) + +Defined in: [src/core/mixins/MediaInfo.ts:42](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L42) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`endscreen`](../../Mixins/classes/MediaInfo.md#endscreen) + +*** + +### playability\_status? + +> `optional` **playability\_status**: [`IPlayabilityStatus`](../../../../interfaces/IPlayabilityStatus.md) + +Defined in: [src/core/mixins/MediaInfo.ts:46](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L46) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`playability_status`](../../Mixins/classes/MediaInfo.md#playability_status) + +*** + +### player\_config? + +> `optional` **player\_config**: [`IPlayerConfig`](../../../../interfaces/IPlayerConfig.md) + +Defined in: [src/core/mixins/MediaInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L47) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`player_config`](../../Mixins/classes/MediaInfo.md#player_config) + +*** + +### player\_overlays? + +> `optional` **player\_overlays**: [`PlayerOverlay`](../../YTNodes/classes/PlayerOverlay.md) + +Defined in: [src/parser/ytshorts/ShortFormVideoInfo.ts:13](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytshorts/ShortFormVideoInfo.ts#L13) + +*** + +### storyboards? + +> `optional` **storyboards**: [`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md) \| [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md) + +Defined in: [src/core/mixins/MediaInfo.ts:41](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L41) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`storyboards`](../../Mixins/classes/MediaInfo.md#storyboards) + +*** + +### streaming\_data? + +> `optional` **streaming\_data**: [`IStreamingData`](../../../../interfaces/IStreamingData.md) + +Defined in: [src/core/mixins/MediaInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L45) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`streaming_data`](../../Mixins/classes/MediaInfo.md#streaming_data) + +*** + +### watch\_next\_feed? + +> `optional` **watch\_next\_feed**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)[] + +Defined in: [src/parser/ytshorts/ShortFormVideoInfo.ts:11](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytshorts/ShortFormVideoInfo.ts#L11) + +## Accessors + +### actions + +#### Get Signature + +> **get** **actions**(): [`Actions`](../../../../classes/Actions.md) + +Defined in: [src/core/mixins/MediaInfo.ts:247](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L247) + +##### Returns + +[`Actions`](../../../../classes/Actions.md) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`actions`](../../Mixins/classes/MediaInfo.md#actions) + +*** + +### cpn + +#### Get Signature + +> **get** **cpn**(): `string` + +Defined in: [src/core/mixins/MediaInfo.ts:254](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L254) + +Content Playback Nonce. + +##### Returns + +`string` + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`cpn`](../../Mixins/classes/MediaInfo.md#cpn) + +*** + +### page + +#### Get Signature + +> **get** **page**(): \[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] + +Defined in: [src/core/mixins/MediaInfo.ts:261](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L261) + +Parsed InnerTube response. + +##### Returns + +\[[`IPlayerResponse`](../../../../type-aliases/IPlayerResponse.md), [`INextResponse`](../../../../type-aliases/INextResponse.md)?\] + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`page`](../../Mixins/classes/MediaInfo.md#page) + +*** + +### wn\_has\_continuation + +#### Get Signature + +> **get** **wn\_has\_continuation**(): `boolean` + +Defined in: [src/parser/ytshorts/ShortFormVideoInfo.ts:47](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytshorts/ShortFormVideoInfo.ts#L47) + +Checks if continuation is available for the watch next feed. + +##### Returns + +`boolean` + +## Methods + +### addToWatchHistory() + +> **addToWatchHistory**(`client_name?`, `client_version?`, `replacement?`): `Promise`\<`Response`\> + +Defined in: [src/core/mixins/MediaInfo.ts:208](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L208) + +#### Parameters + +##### client\_name? + +`string` + +##### client\_version? + +`string` + +##### replacement? + +`string` = `'https://www.'` + +#### Returns + +`Promise`\<`Response`\> + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`addToWatchHistory`](../../Mixins/classes/MediaInfo.md#addtowatchhistory) + +*** + +### chooseFormat() + +> **chooseFormat**(`options`): [`Format`](../../Misc/classes/Format.md) + +Defined in: [src/core/mixins/MediaInfo.ts:161](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L161) + +Selects the format that best matches the given options. + +#### Parameters + +##### options + +[`FormatOptions`](../../Types/interfaces/FormatOptions.md) + +Options + +#### Returns + +[`Format`](../../Misc/classes/Format.md) + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`chooseFormat`](../../Mixins/classes/MediaInfo.md#chooseformat) + +*** + +### download() + +> **download**(`options`): `Promise`\<`ReadableStream`\<`Uint8Array`\>\> + +Defined in: [src/core/mixins/MediaInfo.ts:169](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L169) + +Downloads the video. + +#### Parameters + +##### options + +[`DownloadOptions`](../../Types/interfaces/DownloadOptions.md) = `{}` + +Download options. + +#### Returns + +`Promise`\<`ReadableStream`\<`Uint8Array`\>\> + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`download`](../../Mixins/classes/MediaInfo.md#download) + +*** + +### getStreamingInfo() + +> **getStreamingInfo**(`url_transformer?`, `format_filter?`): `Promise`\<`StreamingInfo`\> + +Defined in: [src/core/mixins/MediaInfo.ts:144](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L144) + +Get a cleaned up representation of the adaptive_formats + +#### Parameters + +##### url\_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) + +##### format\_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) + +#### Returns + +`Promise`\<`StreamingInfo`\> + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`getStreamingInfo`](../../Mixins/classes/MediaInfo.md#getstreaminginfo) + +*** + +### getTranscript() + +> **getTranscript**(): `Promise`\<[`TranscriptInfo`](../../YT/classes/TranscriptInfo.md)\> + +Defined in: [src/core/mixins/MediaInfo.ts:182](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L182) + +Retrieves the video's transcript. + +#### Returns + +`Promise`\<[`TranscriptInfo`](../../YT/classes/TranscriptInfo.md)\> + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`getTranscript`](../../Mixins/classes/MediaInfo.md#gettranscript) + +*** + +### getWatchNextContinuation() + +> **getWatchNextContinuation**(): `Promise`\<`ShortFormVideoInfo`\> + +Defined in: [src/parser/ytshorts/ShortFormVideoInfo.ts:27](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/parser/ytshorts/ShortFormVideoInfo.ts#L27) + +#### Returns + +`Promise`\<`ShortFormVideoInfo`\> + +*** + +### toDash() + +> **toDash**(`options`): `Promise`\<`string`\> + +Defined in: [src/core/mixins/MediaInfo.ts:104](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L104) + +Generates a DASH manifest from the streaming data. + +#### Parameters + +##### options + +###### format_filter? + +[`FormatFilter`](../../Types/type-aliases/FormatFilter.md) + +###### manifest_options? + +`DashOptions` + +###### url_transformer? + +[`URLTransformer`](../../Types/type-aliases/URLTransformer.md) + +#### Returns + +`Promise`\<`string`\> + +DASH manifest + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`toDash`](../../Mixins/classes/MediaInfo.md#todash) + +*** + +### updateWatchTime() + +> **updateWatchTime**(`startTime`, `client_name`, `client_version`, `replacement`): `Promise`\<`Response`\> + +Defined in: [src/core/mixins/MediaInfo.ts:227](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/core/mixins/MediaInfo.ts#L227) + +#### Parameters + +##### startTime + +`number` + +##### client\_name + +`string` = `Constants.CLIENTS.WEB.NAME` + +##### client\_version + +`string` = `Constants.CLIENTS.WEB.VERSION` + +##### replacement + +`string` = `'https://www.'` + +#### Returns + +`Promise`\<`Response`\> + +#### Inherited from + +[`MediaInfo`](../../Mixins/classes/MediaInfo.md).[`updateWatchTime`](../../Mixins/classes/MediaInfo.md#updatewatchtime)