import WithRawData from '../contracts/WithRawData'; class UserProfile implements WithRawData { readonly raw: any; private _profile: any; constructor(raw: any = {}) { this.raw = raw; this._profile = this.raw[0].data; } async getId(): Promise { return this._profile.userById.databaseId; } async getAvatar(): Promise { return this._profile.userById.avatar.thumbnailUrl; } async getNick(): Promise { return this._profile.userById.nick; } } export default UserProfile;