esios-api-client
Version:
Another ESIOS api client
19 lines (18 loc) • 731 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Indicator = void 0;
const indicator_value_class_1 = require("./indicator-value.class");
class Indicator {
constructor(json) {
this.id = json.id;
this.composited = json.composited;
this.stepType = json.step_type;
this.disaggregated = json.disaggregated;
this.magnitude = json.magnitud;
this.time = json.tiempo;
this.geos = json.geos.map(({ geo_id, geo_name }) => ({ id: geo_id, name: geo_name }));
this.values = json.values.map((value) => new indicator_value_class_1.IndicatorValue(value));
this.updatedAt = json.values_updated_at;
}
}
exports.Indicator = Indicator;
;