@airplanegobrr/jackett-api
Version:
An api for 'Jackett' server requests
45 lines • 1.67 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TorznabIndexerModel = exports.IndexerType = void 0;
var IndexerType;
(function (IndexerType) {
IndexerType[IndexerType["private"] = 0] = "private";
IndexerType[IndexerType["public"] = 1] = "public";
})(IndexerType = exports.IndexerType || (exports.IndexerType = {}));
class TorznabIndexerModel {
constructor(_id, _configured, _title, _description, _link, _language, _type) {
this._id = _id;
this._configured = _configured;
this._title = _title;
this._description = _description;
this._link = _link;
this._language = _language;
this._type = _type;
}
get id() {
return this._id;
}
get configured() {
return this._configured;
}
get title() {
return this._title;
}
get description() {
return this._description;
}
get link() {
return this._link;
}
get language() {
return this._language;
}
get type() {
return this._type;
}
static fromJson(data) {
return new TorznabIndexerModel(data.$.id, JSON.parse(data.$.configured), data === null || data === void 0 ? void 0 : data.title[0], data === null || data === void 0 ? void 0 : data.description[0], data === null || data === void 0 ? void 0 : data.link[0], data === null || data === void 0 ? void 0 : data.language[0], IndexerType[data === null || data === void 0 ? void 0 : data.type[0]]);
}
}
exports.TorznabIndexerModel = TorznabIndexerModel;
//# sourceMappingURL=torznab-indexer.model.js.map