timeeditapi
Advanced tools
Comparing version 1.0.0 to 1.0.5
@@ -20,3 +20,3 @@ 'use strict'; | ||
const parsedJson = JSON.parse(jsonString); | ||
resolve(dataParser.buildTodaysSchedule(parsedJson)); | ||
resolve(dataParser.buildTodaysSchedule(parsedJson, roomId)); | ||
}).catch((er) => { | ||
@@ -38,3 +38,3 @@ reject(er); | ||
const parsedJson = JSON.parse(jsonString); | ||
resolve(dataParser.buildRoomSchedule(parsedJson)); | ||
resolve(dataParser.buildRoomSchedule(parsedJson, roomId)); | ||
}).catch((er) => { | ||
@@ -41,0 +41,0 @@ reject(er); |
@@ -19,4 +19,4 @@ 'use strict'; | ||
*/ | ||
buildTodaysSchedule(object){ | ||
return this.buildRoomSchedule(object) | ||
buildTodaysSchedule(object, roomId){ | ||
return this.buildRoomSchedule(object, roomId) | ||
.filter((reservation) => { | ||
@@ -36,3 +36,3 @@ let reservationDate = this.parseDate(reservation.booking.time.startDate); | ||
*/ | ||
buildRoomSchedule(object){ | ||
buildRoomSchedule(object, roomId){ | ||
if(!object.hasOwnProperty('reservations')){ throw 'invalid search result'; } | ||
@@ -49,2 +49,3 @@ return object.reservations | ||
}, | ||
roomId, | ||
id: reservation.id, | ||
@@ -51,0 +52,0 @@ other: reservation.columns[8], |
{ | ||
"name": "timeeditapi", | ||
"version": "1.0.0", | ||
"version": "1.0.5", | ||
"description": "api to easy get schedule information from timeedit", | ||
@@ -9,4 +9,12 @@ "main": "index.js", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/TimeWarriors/TimeEdit.git" | ||
}, | ||
"author": "richard soderman", | ||
"license": "ISC", | ||
"license": "ISC","bugs": { | ||
"url": "https://github.com/TimeWarriors/TimeEdit/issues" | ||
}, | ||
"homepage": "https://github.com/TimeWarriors/TimeEdit.git#readme", | ||
"dependencies": { | ||
@@ -13,0 +21,0 @@ "cheerio": "^0.19.0", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6512
6
169
1
1
1
1
0