Skip to content

Commit

Permalink
feat(parser): Add optional image property to LockupMetadataView
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue committed Nov 17, 2024
1 parent bdebb9f commit 0affbf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/parser/classes/LockupMetadataView.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import { YTNode } from '../helpers.js';
import { Parser, type RawNode } from '../index.js';
import ContentMetadataView from './ContentMetadataView.js';
import DecoratedAvatarView from './DecoratedAvatarView.js';
import Text from './misc/Text.js';

export default class LockupMetadataView extends YTNode {
static type = 'LockupMetadataView';

title: Text;
metadata: ContentMetadataView | null;
image: DecoratedAvatarView | null;

constructor(data: RawNode) {
super();

this.title = Text.fromAttributed(data.title);
this.metadata = Parser.parseItem(data.metadata, ContentMetadataView);
this.image = Parser.parseItem(data.image, DecoratedAvatarView);
}
}

0 comments on commit 0affbf8

Please sign in to comment.