UNPKG

@ginstone/nga-api

Version:

18 lines (17 loc) 606 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ThreadBody = void 0; const Forum_1 = require("../field/Forum"); const TopicInfo_1 = require("../field/TopicInfo"); class ThreadBody { constructor(raw) { this.currentUser = raw.__CU; if (raw.__F && Object.keys(raw.__F).length > 0) { this.forum = new Forum_1.Forum(raw.__F); } this.total = raw.__ROWS; this.size = raw.__T__ROWS_PAGE; this.topics = Object.keys(raw.__T).map(i => new TopicInfo_1.TopicInfo(raw.__T[i])); } } exports.ThreadBody = ThreadBody;