Skip to content

Commit

Permalink
feat(parser): Add optional image property to LockupMetadataView (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue authored Nov 19, 2024
1 parent 038efff commit 0914299
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 0914299

Please sign in to comment.