feat(parser): Add ActiveAccountHeader

Found on the 'You' (a.k.a, 'Library') page.
This commit is contained in:
Luan
2024-12-10 18:32:31 -03:00
parent c1de097ce1
commit 5f233ae34e
2 changed files with 25 additions and 0 deletions

View File

@@ -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);
}
}

View File

@@ -17,6 +17,7 @@ export { default as SignalAction } from './classes/actions/SignalAction.js';
export { default as UpdateChannelSwitcherPageAction } from './classes/actions/UpdateChannelSwitcherPageAction.js';
export { default as UpdateEngagementPanelAction } from './classes/actions/UpdateEngagementPanelAction.js';
export { default as UpdateSubscribeButtonAction } from './classes/actions/UpdateSubscribeButtonAction.js';
export { default as ActiveAccountHeader } from './classes/ActiveAccountHeader.js';
export { default as AddToPlaylist } from './classes/AddToPlaylist.js';
export { default as Alert } from './classes/Alert.js';
export { default as AlertWithButton } from './classes/AlertWithButton.js';