mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 00:56:23 +00:00
feat(parser): Add ActiveAccountHeader
Found on the 'You' (a.k.a, 'Library') page.
This commit is contained in:
24
src/parser/classes/ActiveAccountHeader.ts
Normal file
24
src/parser/classes/ActiveAccountHeader.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user