-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(parser): Add
ActiveAccountHeader
Found on the 'You' (a.k.a, 'Library') page.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { YTNode } from '../helpers.js'; | ||
import { type RawNode } from '../index.js'; | ||
import Text from './misc/Text.js'; | ||
import Thumbnail from './misc/Thumbnail.js'; | ||
import NavigationEndpoint from './NavigationEndpoint.js'; | ||
|
||
export default class ActiveAccountHeader extends YTNode { | ||
static type = 'ActiveAccountHeader'; | ||
|
||
public account_name: Text; | ||
public account_photo: Thumbnail[]; | ||
public endpoint: NavigationEndpoint; | ||
public manage_account_title: Text; | ||
public channel_handle: Text; | ||
|
||
constructor(data: RawNode) { | ||
super(); | ||
this.account_name = new Text(data.accountName); | ||
this.account_photo = Thumbnail.fromResponse(data.accountPhoto); | ||
this.endpoint = new NavigationEndpoint(data.serviceEndpoint); | ||
this.manage_account_title = new Text(data.manageAccountTitle); | ||
this.channel_handle = new Text(data.channelHandle); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters