mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 18:17:38 +00:00
26 lines
533 B
TypeScript
26 lines
533 B
TypeScript
import TweetModel from "../../../data/TweetModel";
|
|
import SkinResolver from "./SkinResolver";
|
|
|
|
export default class TweetResolver {
|
|
_model: TweetModel;
|
|
constructor(model: TweetModel) {
|
|
this._model = model;
|
|
}
|
|
|
|
url() {
|
|
return this._model.getUrl();
|
|
}
|
|
likes() {
|
|
return this._model.getLikes();
|
|
}
|
|
retweets() {
|
|
return this._model.getRetweets();
|
|
}
|
|
async skin() {
|
|
const skin = await this._model.getSkin();
|
|
if (skin == null) {
|
|
return null;
|
|
}
|
|
return SkinResolver.fromModel(skin);
|
|
}
|
|
}
|