mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-23 23:09:28 +00:00
feat: finalize comment section nodes (#280)
* fix: comment translation proto missing channel id * feat: finalize nodes * docs: update API ref * chore: update tests
This commit is contained in:
@@ -1,21 +1,22 @@
|
||||
import Parser from '../../index';
|
||||
import Thumbnail from '../misc/Thumbnail';
|
||||
import Text from '../misc/Text';
|
||||
import type Button from '../Button';
|
||||
import { YTNode } from '../../helpers';
|
||||
|
||||
class CommentSimplebox extends YTNode {
|
||||
static type = 'CommentSimplebox';
|
||||
|
||||
submit_button;
|
||||
cancel_button;
|
||||
submit_button: Button | null;
|
||||
cancel_button: Button | null;
|
||||
author_thumbnails: Thumbnail[];
|
||||
placeholder: Text;
|
||||
avatar_size;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.submit_button = Parser.parse(data.submitButton);
|
||||
this.cancel_button = Parser.parse(data.cancelButton);
|
||||
this.submit_button = Parser.parseItem<Button>(data.submitButton);
|
||||
this.cancel_button = Parser.parseItem<Button>(data.cancelButton);
|
||||
this.author_thumbnails = Thumbnail.fromResponse(data.authorThumbnail);
|
||||
this.placeholder = new Text(data.placeholderText);
|
||||
this.avatar_size = data.avatarSize;
|
||||
|
||||
Reference in New Issue
Block a user