feat: add CollaboratorInfoCardContent renderer parser (#180)

This commit is contained in:
LuanRT
2022-09-10 04:09:38 -03:00
committed by GitHub
parent 88ebb5e2ae
commit eb44b71939
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import Text from './misc/Text';
import Thumbnail from './misc/Thumbnail';
import NavigationEndpoint from './NavigationEndpoint';
import { YTNode } from '../helpers';
class CollaboratorInfoCardContent extends YTNode {
static type = 'CollaboratorInfoCardContent';
channel_avatar: Thumbnail[];
custom_text: Text;
channel_name: Text;
subscriber_count: Text;
endpoint: NavigationEndpoint;
constructor(data: any) {
super();
this.channel_avatar = Thumbnail.fromResponse(data.channelAvatar);
this.custom_text = new Text(data.customText);
this.channel_name = new Text(data.channelName);
this.subscriber_count = new Text(data.subscriberCountText);
this.endpoint = new NavigationEndpoint(data.endpoint);
}
}
export default CollaboratorInfoCardContent;