wwwitsourceproviders-attendanceapi
Version:
Attendance Tracker
24 lines • 768 B
JavaScript
class SResponse {
constructor(i, m, b) {
this.id = i;
this.messages = m;
this.raw = b;
this.body = [];
var len = this.raw.length;
for (var k = 1; k < len; k++) {
var current = this.raw[k];
if (current['date'] != null || current['code'] != null || current['reference'] != null || current['added'] != null || current['updated'] != null) {
this.other = current;
this.body.push(current);
}
else if (current['-event'] != null) {
this.event = current;
this.body.push(current);
}
else {
this.body.push(current);
}
}
}
}
module.exports = SResponse;