mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-20 04:51:16 +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 CommentReplyDialog extends YTNode {
|
||||
static type = 'CommentReplyDialog';
|
||||
|
||||
reply_button;
|
||||
cancel_button;
|
||||
author_thumbnail;
|
||||
placeholder;
|
||||
error_message;
|
||||
reply_button: Button | null;
|
||||
cancel_button: Button | null;
|
||||
author_thumbnail: Thumbnail[];
|
||||
placeholder: Text;
|
||||
error_message: Text;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.reply_button = Parser.parse(data.replyButton);
|
||||
this.cancel_button = Parser.parse(data.cancelButton);
|
||||
this.reply_button = Parser.parseItem<Button>(data.replyButton);
|
||||
this.cancel_button = Parser.parseItem<Button>(data.cancelButton);
|
||||
this.author_thumbnail = Thumbnail.fromResponse(data.authorThumbnail);
|
||||
this.placeholder = new Text(data.placeholderText);
|
||||
this.error_message = new Text(data.errorMessage);
|
||||
|
||||
Reference in New Issue
Block a user