troi-library
Advanced tools
Comparing version
23
index.js
@@ -228,2 +228,25 @@ import debugModule from "debug"; | ||
} | ||
async getCalendarEvents(type, startDate, endDate) { | ||
const calendarEvents = await this.makeRequest({ | ||
url: "/calendarEvents", | ||
params: { | ||
start: startDate, | ||
end: endDate, | ||
type: type, | ||
}, | ||
}) || []; | ||
return calendarEvents | ||
.map((obj) => { | ||
return { | ||
id: obj.id, | ||
startDate: obj.Start, | ||
endDate: obj.End, | ||
subject: obj.Subject, | ||
type: obj.Type, | ||
}; | ||
}) | ||
.sort((a, b) => (a.startDate > b.startDate ? 1 : -1)); | ||
} | ||
} |
{ | ||
"name": "troi-library", | ||
"version": "1.0.1", | ||
"version": "1.1.1", | ||
"description": "API library wrapper to interact with troi", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8774
6.49%228
10.14%2
-33.33%