@sawjan/teamup-client
v2.0.1
Published
Simple client for Teamup calendar API
Downloads
3
Readme
Teamup Calendar Client
A library for working with Teamup calendar.
Installation
npm i @sawjan/teamup-client
Usage
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>
}