2.0.1 • Published 2 years ago
@sawjan/teamup-client v2.0.1
Teamup Calendar Client
A library for working with Teamup calendar.
Installation
npm i @sawjan/teamup-clientUsage
const TeamupClient = require('@sawjan/teamup-client')
const client = new TeamupClient({
url: 'https://api.teamup.com',
calendarKey: '<calendar-key>',
teamupToken: '<teamup-token>',
bearerToken: '<bearer-token>',
})Examples
See example code: examples
APIs
Event
.getEvents(options)
For available options see Query Parameters
.getAllDayEvents(options)
- .getRecurringEvents(options)
- .getEvent(eventId)
SubCalendar
.getSubCalendars(options)
For available options see Query Parameters
.getInactiveSubCalendars(options)
- .getSubCalendar(subCalendarId):
- .getSubCalendarByName(subCalendarName)
All APIs will either return Promise\<SuccessResponse> or throw Promise\<ErrorResponse>
Structs
SuccessResponse
{
status: <number>,
statusText: <string>,
data: <array>|<object>
}ErrorResponse
{
status: <number>,
statusText: <string>,
error: <object>
}