youtubei.js / YTNodes / MusicTwoRowItem
Class: MusicTwoRowItem
Extends
Constructors
new MusicTwoRowItem()
new MusicTwoRowItem(
data
):MusicTwoRowItem
Parameters
• data: RawNode
Returns
Overrides
Defined in
src/parser/classes/MusicTwoRowItem.ts:42
Properties
artists?
optional
artists:object
[]
Defined in
src/parser/classes/MusicTwoRowItem.ts:26
author?
optional
author:object
channel_id
channel_id:
undefined
|string
endpoint
endpoint:
undefined
|NavigationEndpoint
name
name:
string
Defined in
src/parser/classes/MusicTwoRowItem.ts:32
badges
badges:
null
|SuperParsedResult
<YTNode
>
Defined in
src/parser/classes/MusicTwoRowItem.ts:19
endpoint
endpoint:
NavigationEndpoint
Defined in
src/parser/classes/MusicTwoRowItem.ts:16
id
id:
undefined
|string
Defined in
src/parser/classes/MusicTwoRowItem.ts:17
item_count?
optional
item_count:null
|string
Defined in
src/parser/classes/MusicTwoRowItem.ts:22
item_type
item_type:
string
Defined in
src/parser/classes/MusicTwoRowItem.ts:20
menu
menu:
null
|Menu
Defined in
src/parser/classes/MusicTwoRowItem.ts:40
subscribers?
optional
subscribers:string
Defined in
src/parser/classes/MusicTwoRowItem.ts:21
subtitle
subtitle:
Text
Defined in
src/parser/classes/MusicTwoRowItem.ts:18
thumbnail
thumbnail:
Thumbnail
[]
Defined in
src/parser/classes/MusicTwoRowItem.ts:38
thumbnail_overlay
thumbnail_overlay:
null
|MusicItemThumbnailOverlay
Defined in
src/parser/classes/MusicTwoRowItem.ts:39
title
title:
Text
Defined in
src/parser/classes/MusicTwoRowItem.ts:15
type
readonly
type:string
Inherited from
Defined in
views?
optional
views:string
Defined in
src/parser/classes/MusicTwoRowItem.ts:24
year?
optional
year:string
Defined in
src/parser/classes/MusicTwoRowItem.ts:23
type
static
type:string
='MusicTwoRowItem'
Overrides
Defined in
src/parser/classes/MusicTwoRowItem.ts:13
Methods
as()
as<
T
,K
>(...types
):InstanceType
<K
[number
]>
Cast to one of the given types.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
Returns
InstanceType
<K
[number
]>
Inherited from
Defined in
hasKey()
hasKey<
T
,R
>(key
):this is MusicTwoRowItem & { [k in string]: R }
Check for a key without asserting the type.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
this is MusicTwoRowItem & { [k in string]: R }
Whether the node has the key
Inherited from
Defined in
is()
is<
T
,K
>(...types
):this is InstanceType<K[number]>
Check if the node is of the given type.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
The type to check
Returns
this is InstanceType<K[number]>
whether the node is of the given type
Inherited from
Defined in
key()
key<
T
,R
>(key
):Maybe
Assert that the node has the given key and return it.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
The value of the key wrapped in a Maybe
Throws
If the node does not have the key