UNPKG

stackexchange-api

Version:
33 lines (32 loc) 2.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Site_1 = require("./Site"); /** * The equivalent of [Type info](https://api.stackexchange.com/docs/types/info).<br> * This object describes a [[Site]] in the [Stack Exchange network](https://stackexchange.com/sites). */ class Info { constructor(info) { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2; this.answersPerMinute = (_b = (_a = info) === null || _a === void 0 ? void 0 : _a.answers_per_minute, (_b !== null && _b !== void 0 ? _b : null)); this.apiRevision = (_d = (_c = info) === null || _c === void 0 ? void 0 : _c.api_revision, (_d !== null && _d !== void 0 ? _d : null)); this.badgesPerMinute = (_f = (_e = info) === null || _e === void 0 ? void 0 : _e.badges_per_minute, (_f !== null && _f !== void 0 ? _f : null)); this.newActiveUsers = (_h = (_g = info) === null || _g === void 0 ? void 0 : _g.new_active_users, (_h !== null && _h !== void 0 ? _h : null)); this.questionsPerMinute = (_k = (_j = info) === null || _j === void 0 ? void 0 : _j.questions_per_minute, (_k !== null && _k !== void 0 ? _k : null)); if (typeof ((_l = info) === null || _l === void 0 ? void 0 : _l.site) === 'undefined') { this.site = null; } else { this.site = new Site_1.Site(info.site); } this.totalAccepted = (_o = (_m = info) === null || _m === void 0 ? void 0 : _m.total_accepted, (_o !== null && _o !== void 0 ? _o : null)); this.totalAnswers = (_q = (_p = info) === null || _p === void 0 ? void 0 : _p.total_answers, (_q !== null && _q !== void 0 ? _q : null)); this.totalBadges = (_s = (_r = info) === null || _r === void 0 ? void 0 : _r.total_badges, (_s !== null && _s !== void 0 ? _s : null)); this.totalComments = (_u = (_t = info) === null || _t === void 0 ? void 0 : _t.total_comments, (_u !== null && _u !== void 0 ? _u : null)); this.totalQuestions = (_w = (_v = info) === null || _v === void 0 ? void 0 : _v.total_questions, (_w !== null && _w !== void 0 ? _w : null)); this.totalUnanswered = (_y = (_x = info) === null || _x === void 0 ? void 0 : _x.total_unanswered, (_y !== null && _y !== void 0 ? _y : null)); this.totalUsers = (_0 = (_z = info) === null || _z === void 0 ? void 0 : _z.total_users, (_0 !== null && _0 !== void 0 ? _0 : null)); this.totalVotes = (_2 = (_1 = info) === null || _1 === void 0 ? void 0 : _1.total_votes, (_2 !== null && _2 !== void 0 ? _2 : null)); } } exports.Info = Info;